mirror of https://github.com/wolfSSL/wolfssl
Merge pull request #1089 from JacobBarthelmeh/StaticAnalysisTests
fix potential memory leaks
This commit is contained in:
commit
e9c6fa5f22
|
@ -18791,6 +18791,7 @@ WOLFSSL_DSA* wolfSSL_DSA_new(void)
|
|||
if (wc_InitDsaKey(key) != 0) {
|
||||
WOLFSSL_MSG("wolfSSL_DSA_new InitDsaKey failure");
|
||||
XFREE(key, NULL, DYNAMIC_TYPE_DSA);
|
||||
wolfSSL_DSA_free(external);
|
||||
return NULL;
|
||||
}
|
||||
external->internal = key;
|
||||
|
|
|
@ -5470,8 +5470,10 @@ static int TLSX_KeyShareEntry_Parse(WOLFSSL* ssl, byte* input, word16 length,
|
|||
|
||||
/* Populate a key share object in the extension. */
|
||||
ret = TLSX_KeyShare_Use(ssl, group, keLen, ke, kse);
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
XFREE(ke, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Total length of the parsed data. */
|
||||
return offset + keLen;
|
||||
|
|
Loading…
Reference in New Issue