git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe2901e
)
ldb: Avoid a possible NULL pointer dereference
author
Andreas Schneider
<asn@samba.org>
Thu, 5 Dec 2019 16:02:39 +0000
(17:02 +0100)
committer
Andreas Schneider
<asn@cryptomilk.org>
Fri, 6 Dec 2019 09:12:26 +0000
(09:12 +0000)
Found by cppcheck.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
lib/ldb/ldb_key_value/ldb_kv_index.c
patch
|
blob
|
history
diff --git
a/lib/ldb/ldb_key_value/ldb_kv_index.c
b/lib/ldb/ldb_key_value/ldb_kv_index.c
index 0853b28fe400fe5ac97146840ad07d048950e3e9..059abef67489e40e41f0f9652e5683c51a3b7bd0 100644
(file)
--- a/
lib/ldb/ldb_key_value/ldb_kv_index.c
+++ b/
lib/ldb/ldb_key_value/ldb_kv_index.c
@@
-1175,7
+1175,7
@@
static struct ldb_dn *ldb_kv_index_key(struct ldb_context *ldb,
}
}
- if (v.data != value->data && !empty_val) {
+ if (v
alue != NULL && v
.data != value->data && !empty_val) {
talloc_free(v.data);
}
talloc_free(attr_folded);