svn commit: samba r19370 - in branches/SAMBA_4_0/source/lib/ldb/modules: .

idra at samba.org idra at samba.org
Tue Oct 17 12:35:34 GMT 2006


Author: idra
Date: 2006-10-17 12:35:33 +0000 (Tue, 17 Oct 2006)
New Revision: 19370

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

Log:

Handle errors if talloc_reference fails


Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c	2006-10-17 12:06:20 UTC (rev 19369)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c	2006-10-17 12:35:33 UTC (rev 19370)
@@ -204,9 +204,14 @@
 
 	/* copy new element */
 	*old = *el;
+
 	/* and make sure we reference the contents */
-	talloc_reference(msg->elements, el->name);
-	talloc_reference(msg->elements, el->values);
+	if (!talloc_reference(msg->elements, el->name)) {
+		return -1;
+	}
+	if (!talloc_reference(msg->elements, el->values)) {
+		return -1;
+	}
 
 	return 0;
 }



More information about the samba-cvs mailing list