Fix a crash at exit.
authorRoy Marples <roy@marples.name>
Thu, 11 Sep 2014 23:09:10 +0000 (23:09 +0000)
committerRoy Marples <roy@marples.name>
Thu, 11 Sep 2014 23:09:10 +0000 (23:09 +0000)
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()