commit | b295bf951f391380e60234d0fe6df7ad4f5b00c9 | [log] [tgz] |
---|---|---|
author | Alan Kuo <Alan_Kuo@quantatw.com> | Fri Apr 16 14:16:47 2021 +0800 |
committer | Alan Kuo <Alan_Kuo@quantatw.com> | Fri Apr 16 14:16:47 2021 +0800 |
tree | 43c0d8c0288c00748cf237419cb0c8af2b5e846e | |
parent | c47b845812c16495803a858a7bc63f5511daf27d [diff] |
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
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp index 24e40a4..42a284a 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp
@@ -199,6 +199,7 @@ X509_free(cert); return nullptr; } + BIO_free(certFileBio); return cert; }