s4-ldb: fixed a valgrind error in ldbtest
[samba.git] / source4 / lib / ldb / tools / ldbtest.c
index 6af0ee933633c9283d4c61a18a532bdc985f12b0..adc6ec8115920e4226271b299fce02252420cbaa 100644 (file)
@@ -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) {