From 25aa353bf833fdae1a96158b49daf7588ae3b109 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 12 Apr 2021 19:48:31 +0200 Subject: [PATCH] dirmgr: Avoid double free * dirmgr/http.c (http_prepare_redirect): Avoid double free * dirmgr/ocsp.c (check_signature): Initialize pointer -- Signed-off-by: Jakub Jelen GnuPG-bug-id: 5393 --- dirmngr/http.c | 2 -- dirmngr/ocsp.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dirmngr/http.c b/dirmngr/http.c index 74ce5f465..c662b1b95 100644 --- a/dirmngr/http.c +++ b/dirmngr/http.c @@ -3681,7 +3681,6 @@ http_prepare_redirect (http_redir_info_t *info, unsigned int status_code, if (!newurl) { err = gpg_error_from_syserror (); - http_release_parsed_uri (locuri); return err; } } @@ -3700,7 +3699,6 @@ http_prepare_redirect (http_redir_info_t *info, unsigned int status_code, if (!newurl) { err = gpg_error_from_syserror (); - http_release_parsed_uri (locuri); return err; } } diff --git a/dirmngr/ocsp.c b/dirmngr/ocsp.c index 6864f9854..6ec760d81 100644 --- a/dirmngr/ocsp.c +++ b/dirmngr/ocsp.c @@ -450,7 +450,7 @@ check_signature (ctrl_t ctrl, { gpg_error_t err; int algo, cert_idx; - gcry_sexp_t s_hash; + gcry_sexp_t s_hash = NULL; ksba_cert_t cert; const char *s;