Re: [PATCH] iio: buffer: hw-consumer: fix use-after-free in error path

Andy Shevchenko
2026-04-28T16:07:02Z

On Tue, Apr 28, 2026 at 06:59:28PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 28, 2026 at 10:53:25PM +0800, Felix Gu wrote:

...

> > - struct hw_consumer_buffer *buf;
> > + struct hw_consumer_buffer *buf, *n;
>
> Please, name it rather *tmp.

Or *next. The point is that most of the one-letter variables are kinda reserved
either for integers (like loop variables, local size or number holders, or some
char * pointers).