From 3b42cdad0c27d79766c7e9aae50d13cd93a2ffbf Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 25 Jun 2019 15:26:30 +0200 Subject: [PATCH] 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 file changed, 1 insertion(+) diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c index 5be11f1da..be58aaceb 100644 --- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c @@ -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; }