On Tue, 2015-08-04 at 19:58 +0100, Andrew Cooper wrote: > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > --- > CC: Ian Campbell <ian.campb...@citrix.com> > CC: Ian Jackson <ian.jack...@eu.citrix.com> > CC: Wei Liu <wei.l...@citrix.com> > > For my cpuid work which I have just started, I added an array to physinfo. > Coverity then frowned at me when it spotted all the memory leaks. > > Technically speaking, 4.6 isn't broken due to not having an allocation to free > in _dispose(), but this patch might still be worth taking in 4.6.
We've tended to be rather lax about this for internal code when there is no actual work in the init/dispose functions in the current code base, so while this improvement is the sort of thing we should/would routinely except during development window I personally don't think it is worth a freeze exception. @@ -4653,6 +4654,8 @@ static int libxl__fill_dom0_memory_info(libxl__gc > *gc, uint32_t *target_memkb, > if (rc < 0) > goto out; > > + libxl_physinfo_dispose(&physinfo); > + libxl_physinfo_init(&physinfo); This pattern is starting to crop up a lot in loops of this type. I wonder if I should make the idl generate a libxl_FOO_reinit() which just == dispose+init? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel