Re: [PATCH] perf tools: fix resource leak of closedir() on the error paths
From: Arnaldo Carvalho de Melo
Date: Tue Oct 15 2019 - 10:59:05 EST
Em Tue, Oct 15, 2019 at 10:44:51AM +0200, Jiri Olsa escreveu:
> On Tue, Oct 15, 2019 at 04:30:08PM +0800, Yunfeng Ye wrote:
> > Both build_mem_topology() and rm_rf_depth_pat() have resource leak of
> > closedir() on the error paths.
> >
> > Fix this by calling closedir() before function returns.
> >
> > Fixes: e2091cedd51b ("perf tools: Add MEM_TOPOLOGY feature to perf data file")
> > Fixes: cdb6b0235f17 ("perf tools: Add pattern name checking to rm_rf")
>
> guilty as charged ;-)
>
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Thanks, applied to perf/urgent.
- Arnaldo