forked from wolfSSL/wolfssl
fix hash hrbg memory leaks
This commit is contained in:
@@ -1442,7 +1442,7 @@ int PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
|
||||
XMEMCPY(output + idx, encryptedContent, desOutSz);
|
||||
idx += desOutSz;
|
||||
|
||||
#ifdef NO_RC4
|
||||
#if defined(HAVE_HASHDRBG) || defined(NO_RC4)
|
||||
FreeRng(&rng);
|
||||
#endif
|
||||
|
||||
|
@@ -4704,6 +4704,10 @@ int ecc_test(void)
|
||||
ecc_free(&userB);
|
||||
ecc_free(&userA);
|
||||
|
||||
#if defined(HAVE_HASHDRBG) || defined(NO_RC4)
|
||||
FreeRng(&rng);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5267,6 +5271,10 @@ int pkcs7signed_test(void)
|
||||
free(out);
|
||||
PKCS7_Free(&msg);
|
||||
|
||||
#if defined(HAVE_HASHDRBG) || defined(NO_RC4)
|
||||
FreeRng(&rng);
|
||||
#endif
|
||||
|
||||
if (ret > 0)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user