Skip to contentSkip to conversation

stable-2.02 - cov: unlock lvm2 mutex on error path

PATCH Zdenek Kabelac 1 participant 1 message Jun 25, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3b42cdad0c27d79766c7e9aae50d13cd93a2ffbf
Commit:        3b42cdad0c27d79766c7e9aae50d13cd93a2ffbf
Parent:        49813abc003180a38f9cd1e6c75f68311d005a50
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Jun 25 15:26:30 2019 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Jun 25 17:31:39 2019 +0200

cov: unlock lvm2 mutex on error path

Add missing unlock call on theretical error path where we would be missing our configured command.

---
 daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +1 -0
index 5be11f1..be58aac 100644
@@ -159,6 +159,7 @@ int dmeventd_lvm2_command(struct dm_pool *mem, char *buffer, size_t size,
 			dmeventd_lvm2_lock();
 			if (!dmeventd_lvm2_run(cmd) ||
 			    !(env = getenv(cmd))) {
+				dmeventd_lvm2_unlock();
 				log_error("Unable to find configured command.");
 				return 0;
 			}