[PATCH v2 5/14] locking: Resolve resource leaks on non error path

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

 



Both 'dir' and 'path' were not free'd on successful return
---
 src/locking/lock_driver_sanlock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index d06fa66..0b7c6d5 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -365,6 +365,8 @@ retry:
         VIR_DEBUG("Lockspace %s has been registered", path);
     }
 
+    VIR_FREE(path);
+    VIR_FREE(dir);
     return 0;
 
 error_unlink:
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]