From 07212ec8e06c9d33d159af1a2f5a240954a1156f Mon Sep 17 00:00:00 2001 From: John Knox Date: Tue, 17 Nov 2020 03:56:34 -0800 Subject: [PATCH] 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 --- xplat/Flipper/CertificateUtils.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xplat/Flipper/CertificateUtils.cpp b/xplat/Flipper/CertificateUtils.cpp index e39e089ef..5b6325394 100644 --- a/xplat/Flipper/CertificateUtils.cpp +++ b/xplat/Flipper/CertificateUtils.cpp @@ -205,11 +205,8 @@ bool generateCertSigningRequest( } 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); }