[Top] [All Lists]

Re: [PATCH] xfs: fix memory leak in xlog_recover_add_to_trans

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix memory leak in xlog_recover_add_to_trans
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 27 Sep 2013 12:34:13 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5245B86F.3030309@xxxxxxxxxxx>
References: <20130927140104.515578025@xxxxxxx> <5245B86F.3030309@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 09/27/13 11:55, Eric Sandeen wrote:
On 9/27/13 9:00 AM, tinguely@xxxxxxx wrote:
Free the memory in error path of xlog_recover_add_to_trans().
Normally this memory is freed in recovery pass2, but is leaked
in the error path.

Signed-off-by: Mark Tinguely<tinguely@xxxxxxx>

For this local leak & the fix,

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

Since this gets called in a loop from xlog_recover_process_data(),
I'm wondering what happens to previously-allocated items, if we
return an error and never get to pass2?

(I could be off base, haven't really followed it through, but
it seems like they might leak).


yeah you are correct, it looks like it gets leaked.
I will add it to the list.



<Prev in Thread] Current Thread [Next in Thread>