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

Volker Lendecke vlendec at samba.org
Wed Jul 2 11:36:40 GMT 2008


The branch, v3-3-test has been updated
       via  c8d1bbfddce41cd6bf37dd0a622ef3437a24b492 (commit)
       via  7cec389e19323e99b6b6258e539be9d1fd65810f (commit)
      from  cfbcfc3ffe74f28ec874a6bf1ab93f55f405b6e6 (commit)

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


- Log -----------------------------------------------------------------
commit c8d1bbfddce41cd6bf37dd0a622ef3437a24b492
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jul 2 13:33:25 2008 +0200

    Make idmap_init() static
    
    This is called only from idmap_alloc_init, which feels kindof weird.
    
    Digging deeper in the code...

commit 7cec389e19323e99b6b6258e539be9d1fd65810f
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jul 2 12:22:15 2008 +0200

    Fix two memory leaks in an error path in idmap.c

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

Summary of changes:
 source/include/proto.h  |    1 -
 source/winbindd/idmap.c |    4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/proto.h b/source/include/proto.h
index e918b25..ae5481d 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -10483,7 +10483,6 @@ NTSTATUS smb_register_idmap_alloc(int version, const char *name,
 				  struct idmap_alloc_methods *methods);
 NTSTATUS idmap_close(void);
 NTSTATUS idmap_init_cache(void);
-NTSTATUS idmap_init(void);
 NTSTATUS idmap_allocate_uid(struct unixid *id);
 NTSTATUS idmap_allocate_gid(struct unixid *id);
 NTSTATUS idmap_set_uid_hwm(struct unixid *id);
diff --git a/source/winbindd/idmap.c b/source/winbindd/idmap.c
index 8b16f27..32fc3dc 100644
--- a/source/winbindd/idmap.c
+++ b/source/winbindd/idmap.c
@@ -154,6 +154,7 @@ NTSTATUS smb_register_idmap(int version, const char *name,
 	entry->name = talloc_strdup(idmap_ctx, name);
 	if ( ! entry->name) {
 		DEBUG(0,("Out of memory!\n"));
+		TALLOC_FREE(entry);
 		return NT_STATUS_NO_MEMORY;
 	}
 	entry->methods = methods;
@@ -207,6 +208,7 @@ NTSTATUS smb_register_idmap_alloc(int version, const char *name,
 	entry->name = talloc_strdup(idmap_ctx, name);
 	if ( ! entry->name) {
 		DEBUG(0,("Out of memory!\n"));
+		TALLOC_FREE(entry);
 		return NT_STATUS_NO_MEMORY;
 	}
 	entry->methods = methods;
@@ -277,7 +279,7 @@ NTSTATUS idmap_init_cache(void)
 /****************************************************************************
  ****************************************************************************/
 
-NTSTATUS idmap_init(void)
+static NTSTATUS idmap_init(void)
 {
 	NTSTATUS ret;
 	static NTSTATUS idmap_init_status = NT_STATUS_UNSUCCESSFUL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list