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;