chiark / gitweb /
networkd: correctly handle manager_free(NULL)
authorTom Gundersen <teg@jklm.no>
Thu, 13 Feb 2014 00:38:53 +0000 (01:38 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 13 Feb 2014 00:41:32 +0000 (01:41 +0100)
src/network/networkd-manager.c

index 54e83e3..c1ad69b 100644 (file)
@@ -98,6 +98,9 @@ void manager_free(Manager *m) {
         NetDev *netdev;
         Link *link;
 
+        if (!m)
+                return;
+
         udev_monitor_unref(m->udev_monitor);
         udev_unref(m->udev);
         sd_bus_unref(m->bus);