Message ID | 1456411743-17741-2-git-send-email-george.dunlap@eu.citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
George Dunlap writes ("[PATCH 1/8] tools/xenalyze: Close symbol_file after reading it"): > ...to avoid leaking the FD and associated memory. > > CID 1306872 > > Signed-off-by: George Dunlap <george.dunlap@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> > Not sure if this will actually make coverity happy, or if we need to > actually set symbol_file to NULL. I don't see why you'd need to assign to the symbol_file local (which is about to go out of scope). Ian.
On Fri, Feb 26, 2016 at 12:22:39PM +0000, Ian Jackson wrote: > George Dunlap writes ("[PATCH 1/8] tools/xenalyze: Close symbol_file after reading it"): > > ...to avoid leaking the FD and associated memory. > > > > CID 1306872 > > > > Signed-off-by: George Dunlap <george.dunlap@citrix.com> > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> And applied. > > > Not sure if this will actually make coverity happy, or if we need to > > actually set symbol_file to NULL. > > I don't see why you'd need to assign to the symbol_file local (which > is about to go out of scope). > > Ian. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 1651302..3c90a0f 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -363,6 +363,8 @@ void parse_symbol_file(char *fn) { p=&((*p)->next); } } + + fclose(symbol_file); } /* WARNING not thread safe */
...to avoid leaking the FD and associated memory. CID 1306872 Signed-off-by: George Dunlap <george.dunlap@citrix.com> --- Not sure if this will actually make coverity happy, or if we need to actually set symbol_file to NULL. CC: Ian Jackson <ian.jackson@citrix.com> CC: Wei Liu <wei.liu2@citrix.com> --- tools/xentrace/xenalyze.c | 2 ++ 1 file changed, 2 insertions(+)