[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2742-g88c9cf2

Jeremy Allison jra at samba.org
Wed Jul 16 00:13:17 GMT 2008


The branch, v3-2-test has been updated
       via  88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3 (commit)
      from  a034ad5b28dc22b76ef91901306d5c4f9102178f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3
Author: Andreas Schneider <anschneider at suse.de>
Date:   Tue Jul 15 14:57:32 2008 +0200

    Release still reachable memory if the smbclient context is freed.
    
    Signed-off-by: Andreas Schneider <anschneider at suse.de>

-----------------------------------------------------------------------

Summary of changes:
 source/libsmb/libsmb_context.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/libsmb_context.c b/source/libsmb/libsmb_context.c
index dd78bce..85de44e 100644
--- a/source/libsmb/libsmb_context.c
+++ b/source/libsmb/libsmb_context.c
@@ -200,6 +200,22 @@ smbc_free_context(SMBCCTX *context,
         smbc_setUser(context, NULL);
         
         DEBUG(3, ("Context %p successfully freed\n", context));
+
+	gfree_names();
+	gfree_loadparm();
+	gfree_case_tables();
+	gfree_charcnv();
+	gfree_interfaces();
+
+	gencache_shutdown();
+	secrets_shutdown();
+
+	/* release the talloc null_context memory last */
+	talloc_disable_null_tracking();
+
+	gfree_debugsyms();
+
+        SAFE_FREE(context->internal);
         SAFE_FREE(context);
         return 0;
 }
@@ -411,6 +427,9 @@ smbc_init_context(SMBCCTX *context)
         char *user = NULL;
         char *home = NULL;
         
+        /* track talloc null_context memory */
+        talloc_enable_null_tracking();
+
         if (!context) {
                 errno = EBADF;
                 return NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list