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, 6 Jan 2009 14:51:57 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, fweisbec@...il.com,
	roel.kluin@...il.com, pq@....fi, srostedt@...hat.com
Subject: Re: [PATCH 3/3] tracing/ftrace: fix a memory leak in stat tracing

On Tue, 06 Jan 2009 17:33:40 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:

>  static int stat_seq_show(struct seq_file *s, void *v)
>  {
> -	struct trace_stat_list *l = list_entry(v, struct trace_stat_list, list);
> -	return current_tracer.stat_show(s, l->stat);
> +	struct trace_stat_list *entry =
> +		list_entry(v, struct trace_stat_list, list);
> +
> +	return current_tracer.stat_show(s, entry->stat);
>  }

Rather than jumping through weird 80-column hoops, one can just do:

	struct trace_stat_list *entry;

	...

	entry = list_entry(v, struct trace_stat_list, list);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ