diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-12-23 06:39:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:36 -0500 |
commit | 93995188d99f3452b2bd385f0a9a7f5ebd240f8e (patch) | |
tree | a6a4a140cede457e6d063ab452c113f83ca10247 | |
parent | a42bbe3cdffe8f0cfdf19583c981f1a18e4cc331 (diff) | |
download | samba-93995188d99f3452b2bd385f0a9a7f5ebd240f8e.tar.gz samba-93995188d99f3452b2bd385f0a9a7f5ebd240f8e.tar.bz2 samba-93995188d99f3452b2bd385f0a9a7f5ebd240f8e.zip |
r4342: Fix a memory leak in init_globals().
Andrew Bartlett
(This used to be commit cc47b4c6fc932f8257506276eaa1a98a41055f8b)
-rw-r--r-- | source4/param/loadparm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 059b7b1cb2..1ecc53fac0 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -895,6 +895,7 @@ static void init_printer_values(void) static void init_globals(void) { int i; + char *myname; DEBUG(3, ("Initialising global parameters\n")); @@ -913,7 +914,9 @@ static void init_globals(void) do_parameter("socket options", "TCP_NODELAY"); #endif do_parameter("workgroup", DEFAULT_WORKGROUP); - do_parameter("netbios name", get_myname()); + myname = get_myname(); + do_parameter("netbios name", myname); + SAFE_FREE(myname); do_parameter("max protocol", "NT1"); do_parameter("name resolve order", "lmhosts wins host bcast"); |