summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}