lib/util/modules.c: fix stackframe leak.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 17 Jul 2012 19:32:31 +0000 (05:02 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 17 Jul 2012 19:32:31 +0000 (05:02 +0930)
do_smb_load_module() doesn't free its stackframe on success.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/util/modules.c

index 93fd79be3d4b1ff74b634f449fd824dffc5febbf..23298da344956d09fb72d6e1b7161171bb5c34aa 100644 (file)
@@ -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;
 }