From 0d2c1e9046faf102809bc65329c22b6cf8d62ea0 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 20 May 2021 10:13:51 +0200 Subject: dirmgr: clean up memory on error code paths * dirmgr/crlcache.c (finish_sig_check): goto leave instead of return * dirmgr/http.c (send_request): free authstr and proxy_authstr * dirmgr/ldap.c (start_cert_fetch_ldap): free proxy * dirmgr/ocsp.c (check_signature): release s_hash -- Signed-off-by: Jakub Jelen GnuPG-bug-id: 5393 --- dirmngr/http.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dirmngr/http.c') diff --git a/dirmngr/http.c b/dirmngr/http.c index f7f65303b..74ce5f465 100644 --- a/dirmngr/http.c +++ b/dirmngr/http.c @@ -2208,7 +2208,11 @@ send_request (ctrl_t ctrl, http_t hd, const char *httphost, const char *auth, p = build_rel_path (hd->uri); if (!p) - return gpg_err_make (default_errsource, gpg_err_code_from_syserror ()); + { + xfree (authstr); + xfree (proxy_authstr); + return gpg_err_make (default_errsource, gpg_err_code_from_syserror ()); + } if (http_proxy && *http_proxy) { -- cgit v1.2.3