diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-04-01 16:27:58 +1300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-07 22:14:21 +0200 |
commit | 7736c9693502e0359634ace325957a468a32dac3 (patch) | |
tree | 60899a44b94b37c50dd173e386322483d5c6e5cc /source3 | |
parent | 9fdcf7888b9cf35cdb799414153e6b6be5cc0d88 (diff) | |
download | samba-7736c9693502e0359634ace325957a468a32dac3.tar.gz samba-7736c9693502e0359634ace325957a468a32dac3.tar.xz samba-7736c9693502e0359634ace325957a468a32dac3.zip |
param: Use an explicit talloc_stackframe() in lp_load_ex for clarity and certainty
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 7 22:14:21 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 9c3119fb500..2ba2037a629 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3974,6 +3974,7 @@ static bool lp_load_ex(const char *pszFname, { char *n2 = NULL; bool bRetval; + TALLOC_CTX *frame = talloc_stackframe(); bRetval = false; @@ -4024,6 +4025,7 @@ static bool lp_load_ex(const char *pszFname, } if (lp_config_backend_is_registry()) { + bool ok; /* config backend changed to registry in config file */ /* * We need to use this extra global variable here to @@ -4037,10 +4039,12 @@ static bool lp_load_ex(const char *pszFname, "registry\n")); init_globals(true); lp_kill_all_services(); - return lp_load_ex(pszFname, global_only, save_defaults, - add_ipc, initialize_globals, - allow_include_registry, - load_all_shares); + ok = lp_load_ex(pszFname, global_only, save_defaults, + add_ipc, initialize_globals, + allow_include_registry, + load_all_shares); + TALLOC_FREE(frame); + return ok; } } else if (lp_config_backend_is_registry()) { bRetval = process_registry_globals(); @@ -4114,6 +4118,7 @@ static bool lp_load_ex(const char *pszFname, bAllowIncludeRegistry = true; + TALLOC_FREE(frame); return (bRetval); } |