From f401930546dc719a9abd5a4b28315388a247dfc6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Nov 2010 11:06:33 +1100 Subject: s4-loadparm: fixed a memory leak in handle_realm() we need to free the lowercase and uppercase varients --- source4/param/loadparm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/param/loadparm.c') diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 09d4f394d3..e7caf66004 100644 --- 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); -- cgit