Fix a crash at exit.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-qt.cpp
index d40ce4023632059630c039be27e17a317f2b0c1e..4d0ead8f7fd3db7fc85868876f2d6e769c8d0295 100644 (file)
@@ -79,12 +79,12 @@ DhcpcdQt::~DhcpcdQt()
        qDeleteAll(*wis);
        delete wis;
 
-       free(lastStatus);
-
        if (con != NULL) {
                dhcpcd_close(con);
                dhcpcd_free(con);
        }
+
+       free(lastStatus);
 }
 
 void DhcpcdQt::animate()