From 7817caa3c77e384e748e8ae9cfa8ea95a6872b46 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 30 Jan 2018 15:27:22 +1100 Subject: [PATCH] 4882. [bug] Address potential memory leak in dns_update_signaturesinc. [RT #47084] --- CHANGES | 3 +++ lib/dns/update.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 6aac08effd..a039384f3c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4882. [bug] Address potential memory leak in + dns_update_signaturesinc. [RT #47084] + 4881. [bug] Only include dst_openssl.h when OpenSSL is required. [RT #47068] diff --git a/lib/dns/update.c b/lib/dns/update.c index 076b2c1185..4273666eaf 100644 --- a/lib/dns/update.c +++ b/lib/dns/update.c @@ -2008,6 +2008,10 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db, } failure: + if (node != NULL) { + dns_db_detachnode(db, &node); + } + dns_diff_clear(&state->sig_diff); dns_diff_clear(&state->nsec_diff); dns_diff_clear(&state->nsec_mindiff);