torture: Fix CID 1452288 Null pointer dereferences (NULL_RETURNS)
authorVolker Lendecke <vl@samba.org>
Wed, 14 Aug 2019 06:41:03 +0000 (08:41 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 14 Aug 2019 08:59:23 +0000 (08:59 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph B√∂hme <slow@samba.org>
Autobuild-Date(master): Wed Aug 14 08:59:23 UTC 2019 on sn-devel-184

source4/torture/local/mdspkt.c

index a73c176e74607fa55a563fa37f7744cb459c766a..dd9c391e9e720a3ae55884e17ecba034e7904a1f 100644 (file)
@@ -72,7 +72,7 @@ static bool test_mdspkt_empty_cnid_fm(struct torture_context *tctx)
        torture_assert_goto(tctx, ret, ret, done, "sl_unpack failed\n");
 
        cnids = dalloc_get(d, "DALLOC_CTX", 0, "sl_cnids_t", 1);
-       torture_assert_not_null_goto(tctx, d, ret, done,
+       torture_assert_not_null_goto(tctx, cnids, ret, done,
                                     "dalloc_get cnids failed\n");
 
        ncnids = dalloc_size(cnids->ca_cnids);