svn commit: samba r19897 - in branches/SAMBA_4_0/source/lib/ldb/tools: .

vlendec at samba.org vlendec at samba.org
Sat Nov 25 17:00:57 GMT 2006


Author: vlendec
Date: 2006-11-25 17:00:55 +0000 (Sat, 25 Nov 2006)
New Revision: 19897

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

Log:
Fix klokwork ids 2278 and 2279
Modified:
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c	2006-11-25 16:55:11 UTC (rev 19896)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c	2006-11-25 17:00:55 UTC (rev 19897)
@@ -269,10 +269,17 @@
 				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);
+			if (!(control = talloc(ctrl[i],
+					       struct ldb_vlv_req_control))) {
+				fprintf(stderr, "talloc failed\n");
+				return NULL;
+			}
 			control->beforeCount = bc;
 			control->afterCount = ac;
 			if (attr[0]) {



More information about the samba-cvs mailing list