diff options
author | Jakub Jelen <[email protected]> | 2021-05-20 08:13:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2021-05-20 11:38:24 +0000 |
commit | 0d2c1e9046faf102809bc65329c22b6cf8d62ea0 (patch) | |
tree | 77d96006e7abde0a7e987fa858b96e25b19e53bf /dirmngr/http.c | |
parent | agent: Avoid memory leaks in error code paths. (diff) | |
download | gnupg-0d2c1e9046faf102809bc65329c22b6cf8d62ea0.tar.gz gnupg-0d2c1e9046faf102809bc65329c22b6cf8d62ea0.zip |
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 <[email protected]>
GnuPG-bug-id: 5393
Diffstat (limited to 'dirmngr/http.c')
-rw-r--r-- | dirmngr/http.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |