Re: CONFIG_PREEMPT and JFFS2 oops

Joakim Tjernlund
2012-01-26T16:48:19Z

Paul Walmsley <paul@pwsan.com> wrote on 2012/01/26 17:38:46:
>
> On Thu, 26 Jan 2012, Paul Walmsley wrote:
>
> > On Thu, 26 Jan 2012, Joakim Tjernlund wrote:
> >
> > > I think I found one bug by looking at the patch. You need 2 buffers, one
> > > that holds the latest compressed data and one working buffer.
> >
> > Thanks, I think you're right. Here's an updated patch.
>
> ... which has another minor bug: it leaks memory if the first allocation
> fails. Here's a version with that fixed.

Still leeks:
+ best_slen = tdl;
+ best_buf = tmp_buf;
+ best = this;

You just throw away best_buf here, don't you?