diff options
author | Alan Kuo <Alan_Kuo@quantatw.com> | 2021-04-16 09:16:47 +0300 |
---|---|---|
committer | Alan Kuo <Alan_Kuo@quantatw.com> | 2021-04-16 09:16:47 +0300 |
commit | b295bf951f391380e60234d0fe6df7ad4f5b00c9 (patch) | |
tree | 43c0d8c0288c00748cf237419cb0c8af2b5e846e | |
parent | c47b845812c16495803a858a7bc63f5511daf27d (diff) | |
download | bmcweb-b295bf951f391380e60234d0fe6df7ad4f5b00c9.tar.xz |
Fix memory leak issue when opening the certificate file
Fix memory leak issue when opening the certificate file
Refer to details: https://github.com/openbmc/bmcweb/issues/195
Tested:
Check the number of open files in bmcweb via lsof command
$lsof -p {the pid of bmcweb} | grep REG |grep pem | wc -l
0
Signed-off-by: Alan Kuo <Alan_Kuo@quantatw.com>
Change-Id: Id05fc4f3e653f51c5f02212ad8f361c7e8091808
-rw-r--r-- | include/ssl_key_handler.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp index 24e40a48af..42a284af42 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp @@ -199,6 +199,7 @@ inline X509* loadCert(const std::string& filePath) X509_free(cert); return nullptr; } + BIO_free(certFileBio); return cert; } |