lxc: don't unlink(NULL) in main

* src/lxc_controller.c (main): Unlink sockpath only if it's non-NULL.
This commit is contained in:
Jim Meyering 2009-09-02 10:02:49 +02:00
parent e4ac19a87a
commit 625f1745dd

View File

@ -803,6 +803,7 @@ cleanup:
if (def)
virFileDeletePid(LXC_STATE_DIR, def->name);
lxcControllerCleanupInterfaces(nveths, veths);
if (sockpath)
unlink(sockpath);
VIR_FREE(sockpath);