BUG/MINOR: ssl: ssl_sock_load_issuer_file_into_ckch memory leak
"set ssl cert <filename.issuer> <payload>" CLI command must free
previous context.
This patch should be backport to 2.1
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 7d654bd..e2c58a5 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -3237,8 +3237,11 @@
err && *err ? *err : "", path);
goto end;
}
- ret = 0;
+ /* no error, fill ckch with new context, old context must be free */
+ if (ckch->ocsp_issuer)
+ X509_free(ckch->ocsp_issuer);
ckch->ocsp_issuer = issuer;
+ ret = 0;
end: