diff --git a/daemon/remote.c b/daemon/remote.c index f69e0ef07..d30801f1d 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -2527,8 +2527,10 @@ do_auth_zone_transfer(RES* ssl, struct worker* worker, char* arg) if(!az || !auth_zones_startprobesequence(az, &worker->env, nm, nmlen, LDNS_RR_CLASS_IN)) { (void)ssl_printf(ssl, "error zone xfr task not found %s\n", arg); + free(nm); return; } + free(nm); send_ok(ssl); } diff --git a/doc/Changelog b/doc/Changelog index 1437815e8..932595208 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +30 January 2020: Ralph + - Fix memory leak in error condition remote.c + - Fix double free in error condition view.c + - Fix memory leak in do_auth_zone_transfer on success + 30 January 2020: Wouter - Fix subnet tests for disabled DSA algorithm by default. - Update contrib/fastrpz.patch for clean diff with current code. @@ -8,7 +13,7 @@ 29 January 2020: Ralph - Merge PR#156 from Alexander Berkes; Added unbound-control - view_local_datas_remove command. + view_local_datas_remove command. 29 January 2020: Wouter - Fix #157: undefined reference to `htobe64'. diff --git a/services/view.c b/services/view.c index c6709e58f..db48ae954 100644 --- a/services/view.c +++ b/services/view.c @@ -198,8 +198,6 @@ views_apply_cfg(struct views* vs, struct config_file* cfg) log_err("failed to insert " "default zones into " "local-zone list"); - free(nd_str); - free(nd_type); lock_rw_unlock(&v->lock); return 0; }