From a620fc0372a8c493c8d4800acc42cc630acebcb4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 05:02:31 +0930 Subject: lib/util/modules.c: fix stackframe leak. do_smb_load_module() doesn't free its stackframe on success. Signed-off-by: Rusty Russell --- lib/util/modules.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util/modules.c b/lib/util/modules.c index 93fd79be3d..23298da344 100644 --- a/lib/util/modules.c +++ b/lib/util/modules.c @@ -192,6 +192,7 @@ static NTSTATUS do_smb_load_module(const char *subsystem, } if (!init) { + TALLOC_FREE(ctx); return NT_STATUS_UNSUCCESSFUL; } @@ -203,7 +204,7 @@ static NTSTATUS do_smb_load_module(const char *subsystem, module_name, get_friendly_nt_error_msg(status))); dlclose(handle); } - + TALLOC_FREE(ctx); return status; } -- cgit