svn commit: samba r12645 - in branches/SAMBA_3_0/source/passdb: .

vlendec at samba.org vlendec at samba.org
Sat Dec 31 10:57:43 GMT 2005


Author: vlendec
Date: 2005-12-31 10:57:43 +0000 (Sat, 31 Dec 2005)
New Revision: 12645

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12645

Log:
Fix some memleaks. This will also be in the trunk checkin that comes next.

Volker

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-12-31 10:41:59 UTC (rev 12644)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-12-31 10:57:43 UTC (rev 12645)
@@ -4070,6 +4070,9 @@
 	vals = ldap_get_values(ld, entry, "sambaGroupType");
 	if ((vals == NULL) || (vals[0] == NULL)) {
 		DEBUG(5, ("\"sambaGroupType\" not found\n"));
+		if (vals != NULL) {
+			ldap_value_free(vals);
+		}
 		return False;
 	}
 
@@ -4077,9 +4080,12 @@
 
 	if ((state->group_type != 0) &&
 	    ((state->group_type != group_type))) {
+		ldap_value_free(vals);
 		return False;
 	}
 
+	ldap_value_free(vals);
+
 	/* display name is the NT group name */
 
 	vals = ldap_get_values(ld, entry, "displayName");
@@ -4119,6 +4125,9 @@
 	vals = ldap_get_values(ld, entry, "sambaSid");
 	if ((vals == NULL) || (vals[0] == NULL)) {
 		DEBUG(0, ("\"objectSid\" not found\n"));
+		if (vals != NULL) {
+			ldap_value_free(vals);
+		}
 		return False;
 	}
 



More information about the samba-cvs mailing list