Skip to content

Commit a2eddc8

Browse files
committed
tests/api.c: fix double-free()s in test_wolfSSL_FPKI().
1 parent 5ecacfd commit a2eddc8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4933,11 +4933,13 @@ static int test_wolfSSL_FPKI(void)
49334933
DYNAMIC_TYPE_TMP_BUFFER));
49344934
ExpectIntEQ(wc_GetFASCNFromCert(&cert, fascn, &fascnSz), 0);
49354935
XFREE(fascn, NULL, DYNAMIC_TYPE_TMP_BUFFER);
4936+
fascn = NULL;
49364937

49374938
ExpectIntEQ(wc_GetUUIDFromCert(&cert, NULL, &uuidSz), WC_NO_ERR_TRACE(LENGTH_ONLY_E));
49384939
ExpectNotNull(uuid = (byte*)XMALLOC(uuidSz, NULL, DYNAMIC_TYPE_TMP_BUFFER));
49394940
ExpectIntEQ(wc_GetUUIDFromCert(&cert, uuid, &uuidSz), 0);
49404941
XFREE(uuid, NULL, DYNAMIC_TYPE_TMP_BUFFER);
4942+
uuid = NULL;
49414943
wc_FreeDecodedCert(&cert);
49424944

49434945
XMEMSET(buf, 0, 4096);

0 commit comments

Comments
 (0)