mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
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:
parent
e4ac19a87a
commit
625f1745dd
@ -803,7 +803,8 @@ cleanup:
|
|||||||
if (def)
|
if (def)
|
||||||
virFileDeletePid(LXC_STATE_DIR, def->name);
|
virFileDeletePid(LXC_STATE_DIR, def->name);
|
||||||
lxcControllerCleanupInterfaces(nveths, veths);
|
lxcControllerCleanupInterfaces(nveths, veths);
|
||||||
unlink(sockpath);
|
if (sockpath)
|
||||||
|
unlink(sockpath);
|
||||||
VIR_FREE(sockpath);
|
VIR_FREE(sockpath);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user