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

Stefan Metzmacher metze at samba.org
Fri Mar 28 18:49:47 GMT 2008


The branch, v3-2-test has been updated
       via  235c056a0ecbb70b21a2572d42c32067dd699988 (commit)
      from  d090d25cb702965b3d5e4635a26a06f2b62d235d (commit)

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


- Log -----------------------------------------------------------------
commit 235c056a0ecbb70b21a2572d42c32067dd699988
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 28 15:06:56 2008 +0100

    mapping_ldb: fix memory leak in group enumeration
    
    metze

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

Summary of changes:
 source/groupdb/mapping_ldb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c
index 454fe46..6775f61 100644
--- a/source/groupdb/mapping_ldb.c
+++ b/source/groupdb/mapping_ldb.c
@@ -310,7 +310,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_
 	int i, ret;
 	char *expr;
 	fstring name;
-	struct ldb_result *res;
+	struct ldb_result *res = NULL;
 	struct ldb_dn *basedn=NULL;
 	TALLOC_CTX *tmp_ctx;
 
@@ -333,6 +333,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_
 	}
 
 	ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res);
+	talloc_steal(tmp_ctx, res);
 	if (ret != LDB_SUCCESS) goto failed;
 
 	(*pp_rmap) = NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list