diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-28 07:46:49 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-28 07:57:28 +1000 |
commit | e17bf6af22a672ae42f458e8904531d0c36c088f (patch) | |
tree | b5ae6ccff51dcb96f5566fde9ffa712886c5314a /source3 | |
parent | f118eae76dfca2abcab7a89af0f89ca382d20300 (diff) | |
download | samba-e17bf6af22a672ae42f458e8904531d0c36c088f.tar.gz samba-e17bf6af22a672ae42f458e8904531d0c36c088f.tar.bz2 samba-e17bf6af22a672ae42f458e8904531d0c36c088f.zip |
s3-param: Avoid assert on use of talloc_tos() without stackframe
This is hit during samba-tool domain classicupgrade
Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index d9ce4b4b58..c92b6319b7 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2784,13 +2784,14 @@ static bool handle_dos_charset(struct loadparm_context *unused, int snum, const static bool handle_realm(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr) { bool ret = true; - char *realm = strupper_talloc(talloc_tos(), pszParmValue); + TALLOC_CTX *frame = talloc_stackframe(); + char *realm = strupper_talloc(frame, pszParmValue); char *dnsdomain = strlower_talloc(realm, pszParmValue); ret &= string_set(&Globals.szRealm, pszParmValue); ret &= string_set(&Globals.szRealm_upper, realm); ret &= string_set(&Globals.szRealm_lower, dnsdomain); - TALLOC_FREE(realm); + TALLOC_FREE(frame); return ret; } |