mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 20:00:48 +02:00
set s = NULL to prevent use object after free error
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user