svn commit: samba r19324 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

tridge at samba.org tridge at samba.org
Mon Oct 16 10:12:43 GMT 2006


Author: tridge
Date: 2006-10-16 10:12:43 +0000 (Mon, 16 Oct 2006)
New Revision: 19324

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

Log:

fixed a leak on deleting records when no index is in place

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2006-10-16 09:28:39 UTC (rev 19323)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2006-10-16 10:12:43 UTC (rev 19324)
@@ -1030,6 +1030,12 @@
 	char *dn;
 	unsigned int i, j;
 
+	/* find the list of indexed fields */	
+	if (ltdb->cache->indexlist->num_elements == 0) {
+		/* no indexed fields */
+		return 0;
+	}
+
 	if (ldb_dn_is_special(msg->dn)) {
 		return 0;
 	}
@@ -1039,12 +1045,6 @@
 		return -1;
 	}
 
-	/* find the list of indexed fields */	
-	if (ltdb->cache->indexlist->num_elements == 0) {
-		/* no indexed fields */
-		return 0;
-	}
-
 	for (i = 0; i < msg->num_elements; i++) {
 		ret = ldb_msg_find_idx(ltdb->cache->indexlist, msg->elements[i].name, 
 				       NULL, LTDB_IDXATTR);



More information about the samba-cvs mailing list