summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-28 07:46:49 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-28 07:57:28 +1000
commite17bf6af22a672ae42f458e8904531d0c36c088f (patch)
treeb5ae6ccff51dcb96f5566fde9ffa712886c5314a /source3
parentf118eae76dfca2abcab7a89af0f89ca382d20300 (diff)
downloadsamba-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.c5
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;
}