add free in error case CID 327286

This commit is contained in:
JacobBarthelmeh
2023-10-16 13:59:05 -06:00
parent 74b63b6409
commit ae3fdbec47

View File

@ -1328,6 +1328,8 @@ int CM_SaveCertCache(WOLFSSL_CERT_MANAGER* cm, const char* fname)
WOLFSSL_MSG("Cert cache file write failed");
ret = FWRITE_ERROR;
}
}
if (mem != NULL) {
XFREE(mem, cm->heap, DYNAMIC_TYPE_TMP_BUFFER);
}