From c5d26cd7c4d35d52e272f6b6ef5755437a9199e8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 18 Jul 2014 22:46:17 +0000 Subject: [PATCH] Free history --- src/libdhcpcd/dhcpcd.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/libdhcpcd/dhcpcd.c b/src/libdhcpcd/dhcpcd.c index 3c971d4..601d58b 100644 --- a/src/libdhcpcd/dhcpcd.c +++ b/src/libdhcpcd/dhcpcd.c @@ -792,6 +792,7 @@ dhcpcd_free(DHCPCD_CONNECTION *con) { DHCPCD_IF *nif; DHCPCD_WPA *nwpa; + DHCPCD_WI_HIST *nh; assert(con); while (con->interfaces) { @@ -806,5 +807,10 @@ dhcpcd_free(DHCPCD_CONNECTION *con) free(con->wpa); con->wpa = nwpa; } + while (con->wi_history) { + nh = con->wi_history->next; + free(con->wi_history); + con->wi_history = nh; + } free(con); } -- 1.7.1