[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 04/28] lock_driver_lockd: Don't leak lockspace dirs



On daemon deinit only fileLockSpaceDir is freed. The other two
(scsiLockSpaceDir and lvmLockSpaceDir) are missing even though
they are allocated in virLockManagerLockDaemonLoadConfig().

Signed-off-by: Michal Privoznik <mprivozn redhat com>
---
 src/locking/lock_driver_lockd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 957a963a7b..2386b24f40 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -369,6 +369,8 @@ static int virLockManagerLockDaemonDeinit(void)
     if (!driver)
         return 0;
 
+    VIR_FREE(driver->scsiLockSpaceDir);
+    VIR_FREE(driver->lvmLockSpaceDir);
     VIR_FREE(driver->fileLockSpaceDir);
     VIR_FREE(driver);
 
-- 
2.16.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]