lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZEx58HsdECf42Qce@kernel.org>
Date:   Fri, 28 Apr 2023 22:59:12 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Yang Jihong <yangjihong1@...wei.com>
Cc:     peterz@...radead.org, mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        namhyung@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tracepoint: Fix memory leak in is_valid_tracepoint()

Em Fri, Apr 21, 2023 at 02:59:53AM +0000, Yang Jihong escreveu:
> When is_valid_tracepoint() returns 1, need to call put_events_file() to
> free `dir_path`.
> 
> Fixes: 25a7d914274d ("perf parse-events: Use get/put_events_file()")
> Signed-off-by: Yang Jihong <yangjihong1@...wei.com>

Thanks, applied.

- Arnaldo

> ---
>  tools/perf/util/tracepoint.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/util/tracepoint.c b/tools/perf/util/tracepoint.c
> index 89ef56c43311..92dd8b455b90 100644
> --- a/tools/perf/util/tracepoint.c
> +++ b/tools/perf/util/tracepoint.c
> @@ -50,6 +50,7 @@ int is_valid_tracepoint(const char *event_string)
>  				 sys_dirent->d_name, evt_dirent->d_name);
>  			if (!strcmp(evt_path, event_string)) {
>  				closedir(evt_dir);
> +				put_events_file(dir_path);
>  				closedir(sys_dir);
>  				return 1;
>  			}
> -- 
> 2.30.GIT
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ