From: Jim Meyering Date: Wed, 2 Sep 2009 08:02:49 +0000 (+0200) Subject: lxc: don't unlink(NULL) in main X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=625f1745dd64227481d5ea880e2ee70c467ee101;p=libvirt.git lxc: don't unlink(NULL) in main * src/lxc_controller.c (main): Unlink sockpath only if it's non-NULL. --- diff --git a/src/lxc_controller.c b/src/lxc_controller.c index 8d11238a0e..a0db602a8c 100644 --- a/src/lxc_controller.c +++ b/src/lxc_controller.c @@ -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;