Merge pull request #1003 from jrblixt/asn_cMemLeak-fix

Fix possible memory leak in wc_SetKeyUsage.
This commit is contained in:
dgarske
2017-06-29 15:28:53 -07:00
committed by GitHub

View File

@ -9449,6 +9449,7 @@ int wc_SetKeyUsage(Cert *cert, const char *value)
/* parse value, and set corresponding Key Usage value */ /* parse value, and set corresponding Key Usage value */
if ((token = XSTRTOK(str, ",", &ptr)) == NULL) { if ((token = XSTRTOK(str, ",", &ptr)) == NULL) {
XFREE(str, cert->heap, DYNAMIC_TYPE_TMP_BUFFER);
return KEYUSAGE_E; return KEYUSAGE_E;
} }
while (token != NULL) while (token != NULL)