git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deed2a9
)
s4-loadparm: fixed a memory leak in handle_realm()
author
Andrew Tridgell
<tridge@samba.org>
Wed, 17 Nov 2010 00:06:33 +0000
(11:06 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 17 Nov 2010 00:30:07 +0000
(11:30 +1100)
we need to free the lowercase and uppercase varients
source4/param/loadparm.c
patch
|
blob
|
history
diff --git
a/source4/param/loadparm.c
b/source4/param/loadparm.c
index 09d4f394d387e5e7c97e3bae7769ded63c12c62e..e7caf66004bff9de5f2d22156e033a42f2cfb2ab 100644
(file)
--- a/
source4/param/loadparm.c
+++ b/
source4/param/loadparm.c
@@
-1458,6
+1458,9
@@
static bool handle_realm(struct loadparm_context *lp_ctx,
{
string_set(lp_ctx, ptr, pszParmValue);
+ talloc_free(lp_ctx->globals->szRealm_upper);
+ talloc_free(lp_ctx->globals->szRealm_lower);
+
lp_ctx->globals->szRealm_upper = strupper_talloc(lp_ctx, pszParmValue);
lp_ctx->globals->szRealm_lower = strlower_talloc(lp_ctx, pszParmValue);