From: Roy Marples Date: Fri, 18 Jul 2014 22:46:17 +0000 (+0000) Subject: Free history X-Git-Tag: dhcpcd-ui-0.7.0~47 X-Git-Url: https://roy.marples.name/git Free history --- 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); }