Fix use after free in c0sk_test unit test
@@ -1042,11 +1042,11 @@ retry:
destroy_key_generator(kg);
- c0snr_set_destroy(css);
-
err = c0sk_close(mkvdb.ikdb_c0sk);
ASSERT_EQ(0, err);
+ c0snr_set_destroy(css);
+
destroy_mock_cn(mock_cn);
}
@@ -1502,11 +1502,11 @@ MTF_DEFINE_UTEST_PREPOST(c0sk_test, parallel_ctxn_put, no_fail_ctxn_pre, no_fail
destroy_key_generator(kg);
- c0snr_set_destroy(css);
-
err = c0sk_close(mkvdb.ikdb_c0sk);
ASSERT_EQ(0, err);
+ c0snr_set_destroy(css);
+
destroy_mock_cn(mock_cn);
}
