]> xenbits.xensource.com Git - libvirt.git/commit
util: fix releasing pidfile in cleanup
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 4 Nov 2014 09:46:41 +0000 (10:46 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 4 Nov 2014 11:06:38 +0000 (12:06 +0100)
commit3f43bb832646588f57303f09fe5c7ac8ba7602d8
treef31110c0d1858b3e388c67a76c396424abfc69a7
parentc3012a023f2ae5763027cafc1cf2881a3c7c4b45
util: fix releasing pidfile in cleanup

Coverity found out the very obvious problem in the code.  That is that
virPidFileReleasePath() was called only if
virPidFileAcquirePath() returned 0.  But virPidFileAcquirePath() doesn't
return only 0 on success, but the FD that needs to be closed.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virpidfile.c