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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Mar 2016 14:23:40 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	acme@...hat.com, hpa@...or.com, jolsa@...nel.org,
	a.p.zijlstra@...llo.nl, tglx@...utronix.de, dsahern@...il.com,
	namhyung@...nel.org, jolsa@...hat.com,
	linux-kernel@...r.kernel.org, mingo@...hat.com
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf tools: Fix locale handling in pmu parsing


* tip-bot for Jiri Olsa <tipbot@...or.com> wrote:

> @@ -135,6 +146,8 @@ static int perf_pmu__parse_scale(struct perf_pmu_alias *alias, char *dir, char *
>  	/* restore locale */
>  	setlocale(LC_NUMERIC, lc);
>  
> +	free((char *) lc);
> +

Btw., minor side note: why does 'lc' have to be case to 'char *'?

In the kernel kfree() takes 'const void *':

  include/linux/slab.h:void kfree(const void *);

which will accept all pointer types. That avoids unnecessary and fragile type 
casts.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ