[PATCH] leaseshelper: avoid mem leak after storing lease entries

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

 



Contents of existing lease file were being stored in a variable
which was never freed.

---
 src/network/leaseshelper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index e4b5283..c8543a2 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -361,6 +361,7 @@ main(int argc, char **argv)
 
     VIR_FREE(pid_file);
     VIR_FREE(exptime);
+    VIR_FREE(lease_entries);
     VIR_FREE(custom_lease_file);
     virJSONValueFree(lease_new);
     virJSONValueFree(leases_array);
-- 
1.9.3

--
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]