forked from wolfSSL/wolfssl
Merge pull request #1003 from jrblixt/asn_cMemLeak-fix
Fix possible memory leak in wc_SetKeyUsage.
This commit is contained in:
@ -9449,6 +9449,7 @@ int wc_SetKeyUsage(Cert *cert, const char *value)
|
||||
|
||||
/* parse value, and set corresponding Key Usage value */
|
||||
if ((token = XSTRTOK(str, ",", &ptr)) == NULL) {
|
||||
XFREE(str, cert->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
return KEYUSAGE_E;
|
||||
}
|
||||
while (token != NULL)
|
||||
|
Reference in New Issue
Block a user