]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: don't unlink(NULL) in main
authorJim Meyering <meyering@redhat.com>
Wed, 2 Sep 2009 08:02:49 +0000 (10:02 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 16:04:23 +0000 (18:04 +0200)
* src/lxc_controller.c (main): Unlink sockpath only if it's non-NULL.

src/lxc_controller.c

index 8d11238a0e93017709d169f0f8279232da549775..a0db602a8cdde5e323eb7159e199f2a10dd5a211 100644 (file)
@@ -803,7 +803,8 @@ cleanup:
     if (def)
         virFileDeletePid(LXC_STATE_DIR, def->name);
     lxcControllerCleanupInterfaces(nveths, veths);
-    unlink(sockpath);
+    if (sockpath)
+        unlink(sockpath);
     VIR_FREE(sockpath);
 
     return rc;