changeset 4250:c52f082bc674 draft

routes: free optional routes at exit before the global free list.
author Roy Marples <roy@marples.name>
date Wed, 28 Mar 2018 18:31:02 +0000
parents c30233f8cca3
children bd59252d5ae6
files src/dhcpcd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcpcd.c	Wed Mar 28 18:25:16 2018 +0000
+++ b/src/dhcpcd.c	Wed Mar 28 18:31:02 2018 +0000
@@ -2022,6 +2022,7 @@
 		}
 		free(ctx.ifaces);
 	}
+	free_options(&ctx, ifo);
 	rt_dispose(&ctx);
 	free(ctx.duid);
 	if (ctx.link_fd != -1) {
@@ -2029,7 +2030,6 @@
 		close(ctx.link_fd);
 	}
 	if_closesockets(&ctx);
-	free_options(&ctx, ifo);
 	free_globals(&ctx);
 	ipv6_ctxfree(&ctx);
 	dev_stop(&ctx);