git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d7805b
)
s4-ldb: fixed a valgrind error in ldbtest
author
Andrew Tridgell
<tridge@samba.org>
Fri, 18 Dec 2009 02:07:48 +0000
(13:07 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 18 Dec 2009 10:03:40 +0000
(21:03 +1100)
we were using msg->dn after the ldb it contained had been freed
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
source4/lib/ldb/tools/ldbtest.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/tools/ldbtest.c
b/source4/lib/ldb/tools/ldbtest.c
index 6af0ee933633c9283d4c61a18a532bdc985f12b0..adc6ec8115920e4226271b299fce02252420cbaa 100644
(file)
--- a/
source4/lib/ldb/tools/ldbtest.c
+++ b/
source4/lib/ldb/tools/ldbtest.c
@@
-354,6
+354,8
@@
static void start_test_index(struct ldb_context **ldb)
}
basedn = ldb_dn_new(*ldb, *ldb, options->basedn);
+ msg->dn = basedn;
+ ldb_dn_add_child_fmt(msg->dn, "cn=test");
ret = ldb_search(*ldb, *ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL, "uid=test");
if (ret != LDB_SUCCESS) {