From: "Daniel P. Berrange" <berrange(a)redhat.com>
Refactoring of the lock manager hotplug methods lost the
ret = 0 assignment for successful return path
* src/locking/domain_lock.c: Add missing ret = 0 assignments
---
src/locking/domain_lock.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/locking/domain_lock.c b/src/locking/domain_lock.c
index f0a11b7..771ed53 100644
--- a/src/locking/domain_lock.c
+++ b/src/locking/domain_lock.c
@@ -221,6 +221,8 @@ int virDomainLockDiskAttach(virLockManagerPluginPtr plugin,
if (virLockManagerAcquire(lock, NULL, 0) < 0)
goto cleanup;
+ ret = 0;
+
cleanup:
virLockManagerFree(lock);
@@ -240,6 +242,8 @@ int virDomainLockDiskDetach(virLockManagerPluginPtr plugin,
if (virLockManagerRelease(lock, NULL, 0) < 0)
goto cleanup;
+ ret = 0;
+
cleanup:
virLockManagerFree(lock);
@@ -260,6 +264,8 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
if (virLockManagerAcquire(lock, NULL, 0) < 0)
goto cleanup;
+ ret = 0;
+
cleanup:
virLockManagerFree(lock);
@@ -279,6 +285,8 @@ int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
if (virLockManagerRelease(lock, NULL, 0) < 0)
goto cleanup;
+ ret = 0;
+
cleanup:
virLockManagerFree(lock);
--
1.7.5.2