Fix memory leak

Summary:
Fixes https://github.com/facebook/flipper/issues/1561

Thanks to rdunlop for finding this!

Reviewed By: cekkaewnumchai

Differential Revision: D24923154

fbshipit-source-id: f4904730aecb9ecd7f391b5e1dcabc6a6db038cf
This commit is contained in:
John Knox
2020-11-17 03:56:34 -08:00
committed by Facebook GitHub Bot
parent cb625d38dc
commit 07212ec8e0

View File

@@ -205,11 +205,8 @@ bool generateCertSigningRequest(
} }
ret = BIO_flush(csrBio); ret = BIO_flush(csrBio);
if (ret != 1) {
free(pKey, x509_req, bne, privateKey, csrBio);
return ret;
}
free(pKey, x509_req, bne, privateKey, csrBio);
return (ret == 1); return (ret == 1);
} }