2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

Address potential memory leak in dst__openssl_fromlabel

This commit is contained in:
Mark Andrews 2023-07-11 18:40:10 +10:00
parent b442ae8d3e
commit 4c4ecbc83c

View File

@ -342,6 +342,16 @@ dst__openssl_fromlabel(int key_base_id, const char *engine, const char *label,
ppub, ppriv));
}
if (*ppub != NULL) {
EVP_PKEY_free(*ppub);
*ppub = NULL;
}
if (*ppriv != NULL) {
EVP_PKEY_free(*ppriv);
*ppriv = NULL;
}
return (dst__openssl_fromlabel_engine(key_base_id, engine, label, pin,
ppub, ppriv));
}