Handle scan results correctly.
authorRoy Marples <roy@marples.name>
Mon, 20 Apr 2009 06:59:09 +0000 (06:59 +0000)
committerRoy Marples <roy@marples.name>
Mon, 20 Apr 2009 06:59:09 +0000 (06:59 +0000)
src/dhcpcd-gtk/main.c

index b4cf28f274d1ce6f557739eb2038a1739a52964a..d17bf947bed5dc437f80e65b1b00d799a477258c 100644 (file)
@@ -251,8 +251,8 @@ status_cb(DHCPCD_CONNECTION *con, const char *status, _unused void *data)
                dhcpcd_prefs_abort();
                while (wi_scans) {
                        w = wi_scans->next;
-                       dhcpcd_wi_scans_free(w->scans);
-                       free(wi_scans);
+                       dhcpcd_wi_scans_free(wi_scans->scans);
+                       g_free(wi_scans);
                        wi_scans = w;
                }
        } else {
@@ -311,7 +311,7 @@ scan_cb(DHCPCD_CONNECTION *con, DHCPCD_IF *i, _unused void *data)
                        notify(msg, txt, "network-wireless");
                        g_free(txt);
                }
-               g_free(w->scans);
+               dhcpcd_wi_scans_free(w->scans);
        }
        w->scans = scans;
 }