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

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

On 07/23/2014 04:05 PM, Nehal J Wani wrote:
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(+)
ACK and pushed.
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);
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Nehal J Wani