Merge pull request #637 from JacobBarthelmeh/master

PKCS12 : return on memory error
This commit is contained in:
toddouska
2016-11-18 11:03:57 -08:00
committed by GitHub

View File

@ -920,11 +920,12 @@ int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw,
if (k == NULL) {
freeBuffers(*pkey, buf, pkcs12->heap);
freeCertList(certList, pkcs12->heap);
return MEMORY_E;
}
}
size = ret;
if (*pkey == NULL) {
if (*pkey == NULL) {
*pkey = k;
*pkeySz = size;
}