From 6af924e19fd55d3065f5deba0c226061e37e1238 Mon Sep 17 00:00:00 2001 From: pcarana Date: Tue, 14 Jan 2020 15:55:34 -0600 Subject: [PATCH] Fix memory leak when access methods error'd --- src/object/certificate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object/certificate.c b/src/object/certificate.c index bff0d2ad..5def8cab 100644 --- a/src/object/certificate.c +++ b/src/object/certificate.c @@ -2078,7 +2078,7 @@ certificate_traverse(struct rpp *rpp_parent, struct rpki_uri *cert_uri) error = use_access_method(&sia_uris, exec_rsync_method, exec_rrdp_method); if (error) - return error; + goto revert_uris; break; case CA: if (!db_rrdp_uris_visited_exists( @@ -2087,7 +2087,7 @@ certificate_traverse(struct rpp *rpp_parent, struct rpki_uri *cert_uri) error = use_access_method(&sia_uris, exec_rsync_method, exec_rrdp_method); if (error) - return error; + goto revert_uris; } else { mft_exists = true; } -- 2.47.2