git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6417d9e
)
ldb: Fix CID 1034793 Dereference null return value
author
Volker Lendecke
<vl@samba.org>
Sun, 18 Aug 2013 19:49:24 +0000
(19:49 +0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Sun, 18 Aug 2013 23:08:23 +0000
(11:08 +1200)
Add a proper NULL check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/tools/ldbtest.c
patch
|
blob
|
history
diff --git
a/lib/ldb/tools/ldbtest.c
b/lib/ldb/tools/ldbtest.c
index 4e181af9d55f03c623896ca25fc67662e645968b..384624ca5530fa2ba3324ee731f06bef20ea00c5 100644
(file)
--- 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"));