]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix small memory leak in error condition remote.c
authorRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 30 Jan 2020 13:56:48 +0000 (14:56 +0100)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 30 Jan 2020 13:56:48 +0000 (14:56 +0100)
- Fix double free in error condition view.c

daemon/remote.c
doc/Changelog
services/view.c

index f69e0ef072fd3172b7acec5e14ab4d193dbf92ae..5affaefe994c67ef73da5a602139a8851319ccc3 100644 (file)
@@ -2527,6 +2527,7 @@ 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;
        }
        send_ok(ssl);
index fd3d9aa05480229077da7f66c42fc75c4387472d..d935daf09ea33b634c1177b389a79a5a25ffb537 100644 (file)
@@ -1,6 +1,10 @@
+30 January 2020: Ralph
+       - Fix memory leak in error condition remote.c
+       - Fix double free in error condition view.c
+
 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'.
index c6709e58fd6ac729480b3a7b7bd1e8d34de5df9a..db48ae9545f8051f9345ceb5d0373f9859967ede 100644 (file)
@@ -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;
                                        }