1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ldb:tests: Add missing null check for ldb_kv_private

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec  6 11:13:24 UTC 2019 on sn-devel-184
This commit is contained in:
Andreas Schneider 2019-12-05 17:17:42 +01:00 committed by Andreas Schneider
parent 9323b5c500
commit e79e943824

View File

@ -818,7 +818,7 @@ static void do_iterate_range_test(void **state, int range_start,
int ret;
struct test_ctx *test_ctx = talloc_get_type_abort(*state,
struct test_ctx);
struct ldb_kv_private *ldb_kv = get_ldb_kv(test_ctx->ldb);
struct ldb_kv_private *ldb_kv = NULL;
int i;
int num_recs = 1024;
int skip_recs = 10;
@ -827,6 +827,9 @@ static void do_iterate_range_test(void **state, int range_start,
TALLOC_CTX *tmp_ctx;
ldb_kv = get_ldb_kv(test_ctx->ldb);
assert_non_null(ldb_kv);
for (i = 0; i < num_recs; i++){
visits[i] = 0;
}