]> xenbits.xensource.com Git - libvirt.git/commitdiff
leaseshelper: avoid mem leak after storing lease entries
authorNehal J Wani <nehaljw.kkd1@gmail.com>
Wed, 23 Jul 2014 22:05:13 +0000 (03:35 +0530)
committerEric Blake <eblake@redhat.com>
Thu, 24 Jul 2014 01:27:39 +0000 (19:27 -0600)
Contents of existing lease file were being stored in a variable
which was never freed.

src/network/leaseshelper.c

index e4b5283f8baa6ca842e1110b2fdc14e6c9913a90..c8543a2dee064989cc687d418221abe6def32b93 100644 (file)
@@ -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);