]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetSocketNewConnectUNIX: Don't unlink(NULL)
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Apr 2015 14:07:15 +0000 (16:07 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 17 Apr 2015 08:02:28 +0000 (10:02 +0200)
commit1fdac3d99a8147092075593d84350d80f5b9bb45
tree7bb0e6d7e1b2dfd6f081833f50137fc33e8cb15d
parent3a495948b97770b026afab1ccaac560a9669a36e
virNetSocketNewConnectUNIX: Don't unlink(NULL)

There is a possibility that we jump onto error label with @lockpath
still initialized to NULL. Here, the @lockpath should be unlink()-ed,
but passing there a NULL is not a good idea. Don't do that. In fact,
we should call unlink() only if we created the lock file successfully.

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/rpc/virnetsocket.c