set s = NULL to prevent use object after free error

This commit is contained in:
Ruby Martin
2026-02-20 12:16:20 -07:00
parent c17217ce31
commit d85387b84c
+2
View File
@@ -20548,10 +20548,12 @@ static int test_sk_X509(void)
ExpectNotNull(s = wolfSSL_sk_X509_new(NULL));
ExpectIntEQ(sk_X509_num(s), 0);
sk_X509_pop_free(s, NULL);
s = NULL;
ExpectNotNull(s = sk_X509_new_null());
ExpectIntEQ(sk_X509_num(s), 0);
sk_X509_pop_free(s, NULL);
s = NULL;
ExpectNotNull(s = sk_X509_new_null());