summaryrefslogtreecommitdiff
path: root/lib/ldb/tools
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-18 19:49:24 +0000
committerAndrew Bartlett <abartlet@samba.org>2013-08-19 11:08:23 +1200
commit15bd82550dab7a4709e92d639ee563dbc4780366 (patch)
treedbf8770bc52f01b63415bef2d26a84200047f0f3 /lib/ldb/tools
parent6417d9e0355f840ca4cf3b740ad5aabfc534d834 (diff)
downloadsamba-15bd82550dab7a4709e92d639ee563dbc4780366.tar.gz
samba-15bd82550dab7a4709e92d639ee563dbc4780366.tar.bz2
samba-15bd82550dab7a4709e92d639ee563dbc4780366.zip
ldb: Fix CID 1034793 Dereference null return value
Add a proper NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/tools')
-rw-r--r--lib/ldb/tools/ldbtest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ldb/tools/ldbtest.c b/lib/ldb/tools/ldbtest.c
index 4e181af9d5..384624ca55 100644
--- a/lib/ldb/tools/ldbtest.c
+++ b/lib/ldb/tools/ldbtest.c
@@ -324,6 +324,10 @@ static void start_test_index(struct ldb_context **ldb)
ldb_delete(*ldb, indexlist);
msg = ldb_msg_new(NULL);
+ if (msg == NULL) {
+ printf("ldb_msg_new failed\n");
+ exit(LDB_ERR_OPERATIONS_ERROR);
+ }
msg->dn = indexlist;
ldb_msg_add_string(msg, "@IDXATTR", strdup("uid"));