>>> On 4/4/2016 at 11:10 PM, in message <1459782600-16073-2-git-send-email-ian.jack...@eu.citrix.com>, Ian Jackson <ian.jack...@eu.citrix.com> wrote: > Bug introduced in bc023ecd > "libxl_utils: add internal function to read sysfs file contents" > > CID: 1358108 > Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> > CC: cover...@xenproject.org > CC: Chunyan Liu <cy...@suse.com> > --- > tools/libxl/libxl_utils.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c > index ceb8825..bd58a52 100644 > --- a/tools/libxl/libxl_utils.c > +++ b/tools/libxl/libxl_utils.c > @@ -466,6 +466,7 @@ int libxl__read_sysfs_file_contents(libxl__gc *gc, const > char *filename, > e = errno; > assert(e != ENOENT); > if (f) fclose(f); > + free(data);
'data' is malloced with 'gc', it'll be freed by GC_FREE. Do we need to free it here? Chunyan > return e; > } > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel