Free history
authorRoy Marples <roy@marples.name>
Fri, 18 Jul 2014 22:46:17 +0000 (22:46 +0000)
committerRoy Marples <roy@marples.name>
Fri, 18 Jul 2014 22:46:17 +0000 (22:46 +0000)
src/libdhcpcd/dhcpcd.c

index 3c971d45ce7f2635ced6f200a9a32b3e52dd0386..601d58b6e546bfd7f25fe63ef6fcddd9ac1189c8 100644 (file)
@@ -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);
 }