]> git.ipfire.org Git - thirdparty/libvirt.git/commit
sanlock: fix memory leak
authorEric Blake <eblake@redhat.com>
Wed, 21 Sep 2011 20:22:57 +0000 (14:22 -0600)
committerDaniel Veillard <veillard@redhat.com>
Thu, 22 Sep 2011 05:32:20 +0000 (13:32 +0800)
commita55f18929bc5c85a02ffb6cab3fb8785b5120f00
tree58cc7b1f5c669dd73edd717b57c0715e3a6571e8
parent466f902446223d62ad0753b6eb1f93b15a9ee764
sanlock: fix memory leak

Detected by Coverity.  The only way to get to error_unlink is if
path was successfully assigned, so the if was useless.  Meanwhile,
there was a return statement that did not free path.

* src/locking/lock_driver_sanlock.c
(virLockManagerSanlockSetupLockspace): Fix mem-leak, and drop
useless if.
src/locking/lock_driver_sanlock.c