PKCS12 : return on memory error

pull/637/head
Jacob Barthelmeh 2016-11-18 09:40:26 -07:00
parent dad628cb0d
commit ac5436b462
1 changed files with 2 additions and 1 deletions

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;
}