summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-25 17:00:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:33 -0500
commita98d02c2f4f649a2c437bb3821b32fb83deea7c0 (patch)
treec5631fa4a8251604b3e78519a12e81387d947554 /source4/lib/ldb/tools
parentc05c41d3521e8782be01b0413f3551d10487a1ac (diff)
downloadsamba-a98d02c2f4f649a2c437bb3821b32fb83deea7c0.tar.gz
samba-a98d02c2f4f649a2c437bb3821b32fb83deea7c0.tar.bz2
samba-a98d02c2f4f649a2c437bb3821b32fb83deea7c0.zip
r19897: Fix klokwork ids 2278 and 2279
(This used to be commit 44e6d39e0ef17ed5a801f95edaa6fbf5efa21a26)
Diffstat (limited to 'source4/lib/ldb/tools')
-rw-r--r--source4/lib/ldb/tools/cmdline.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 928519f3bb..8eb7a7e952 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -269,10 +269,17 @@ struct ldb_control **parse_controls(void *mem_ctx, char **control_strings)
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]) {