svn commit: samba r19895 - in branches/SAMBA_3_0/source/lib/ldb/tools: .

vlendec at samba.org vlendec at samba.org
Sat Nov 25 16:53:57 GMT 2006


Author: vlendec
Date: 2006-11-25 16:53:56 +0000 (Sat, 25 Nov 2006)
New Revision: 19895

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

Log:
Fix klokwork id 2278
Modified:
   branches/SAMBA_3_0/source/lib/ldb/tools/cmdline.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/ldb/tools/cmdline.c
===================================================================
--- branches/SAMBA_3_0/source/lib/ldb/tools/cmdline.c	2006-11-25 16:43:26 UTC (rev 19894)
+++ branches/SAMBA_3_0/source/lib/ldb/tools/cmdline.c	2006-11-25 16:53:56 UTC (rev 19895)
@@ -269,7 +269,10 @@
 				fprintf(stderr, "   note: b = boolean, n = number, s = string, o = b64 binary blob\n");
 				return NULL;
 			}
-			ctrl[i] = talloc(ctrl, struct ldb_control);
+			if (!(ctrl[i] = talloc(ctrl, struct ldb_control))) {
+				fprintf(stderr, "talloc failed\n");
+				return NULL;
+			}
 			ctrl[i]->oid = LDB_CONTROL_VLV_REQ_OID;
 			ctrl[i]->critical = crit;
 			control = talloc(ctrl[i], struct ldb_vlv_req_control);



More information about the samba-cvs mailing list