From: W.C.A. Wijngaards Date: Mon, 22 Mar 2021 14:29:34 +0000 (+0100) Subject: - Fix memory leak reported by asan in rpz SOA record query name. X-Git-Tag: release-1.13.2rc1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6289806f41ab45a76c12381878803bc50f23a463;p=thirdparty%2Funbound.git - Fix memory leak reported by asan in rpz SOA record query name. --- diff --git a/doc/Changelog b/doc/Changelog index bc2ec6e72..d83948982 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -6,6 +6,7 @@ - iana portlist update. - Comment out nonworking OSX and IOS travis tests, vm fails to start. - Fix compile error in listen_dnsport on Android. + - Fix memory leak reported by asan in rpz SOA record query name. 19 March 2021: Wouter - Fix for #447: squelch connection refused tcp connection failures diff --git a/services/rpz.c b/services/rpz.c index 0c79a0620..3a1ec00d7 100644 --- a/services/rpz.c +++ b/services/rpz.c @@ -488,8 +488,10 @@ rpz_insert_qname_trigger(struct rpz* r, uint8_t* dname, size_t dnamelen, rrtype == LDNS_RR_TYPE_NSEC || rrtype == LDNS_RR_TYPE_NSEC3PARAM || rrtype == LDNS_RR_TYPE_NSEC3 || - rrtype == LDNS_RR_TYPE_DS) + rrtype == LDNS_RR_TYPE_DS) { + free(dname); return; /* no need to log these types as unsupported */ + } dname_str(dname, str); verbose(VERB_ALGO, "RPZ: qname trigger, %s skipping unsupported action: %s", str, rpz_action_to_string(a));