diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-08 17:25:45 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-08 17:25:45 -0800 |
commit | 2a0173743d2cf615d52278f3dd87cc804abe2d16 (patch) | |
tree | c872a57aebebf87658b18703b8abb1ce54c082ec /source/registry/reg_dynamic.c | |
parent | d9335456d23271a4b15b97d24f1b263700a3b9df (diff) | |
download | samba-2a0173743d2cf615d52278f3dd87cc804abe2d16.tar.gz samba-2a0173743d2cf615d52278f3dd87cc804abe2d16.tar.xz samba-2a0173743d2cf615d52278f3dd87cc804abe2d16.zip |
Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
Diffstat (limited to 'source/registry/reg_dynamic.c')
-rw-r--r-- | source/registry/reg_dynamic.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/registry/reg_dynamic.c b/source/registry/reg_dynamic.c index 472760eacfd..e589dff2c85 100644 --- a/source/registry/reg_dynamic.c +++ b/source/registry/reg_dynamic.c @@ -83,17 +83,20 @@ static int tcpip_params( REGVAL_CTR *regvals ) fstring value; int value_length; char *hname; - fstring mydomainname; - + char *mydomainname = NULL; hname = myhostname(); value_length = push_ucs2( value, value, hname, sizeof(value), STR_TERMINATE|STR_NOALIGN); regval_ctr_addvalue( regvals, "Hostname",REG_SZ, value, value_length ); - - get_mydnsdomname( mydomainname ); + + mydomainname = get_mydnsdomname(talloc_tos()); + if (!mydomainname) { + return -1; + } + value_length = push_ucs2( value, value, mydomainname, sizeof(value), STR_TERMINATE|STR_NOALIGN); regval_ctr_addvalue( regvals, "Domain", REG_SZ, value, value_length ); - + return regval_ctr_numvals( regvals ); } |