[PATCH 1/2] staging: tidspbridge: fix bridge_open memory leaks

Omar Ramirez Luna omar.ramirez at copitl.com
Tue Jan 31 18:09:17 UTC 2012


On Tue, Jan 31, 2012 at 2:17 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> On Mon, Jan 30, 2012 at 07:20:17PM -0600, Omar Ramirez Luna wrote:
>> There are two members of pr_ctxt allocated during bridge_open that
>> are never freed resulting in memory leaks, these are stream_id and
>> node_id, they are now freed on release of the handle (bridge_release)
>> right before freeing pr_ctxt.
>>
>> Error path for bridge_open was also fixed since the same variables
>> could result in memory leaking due to missing handling of failure
>> scenarios. While at it, the indentation changes were introduced to
>> avoid interleaved goto statements inside big if blocks.
>>
>
> You mentioned in the cover letter email that you wanted these to go
> into stable.  I don't think that is needed here.  These are tiny
> leaks that we aren't going to hit in real life.

They are hit each time an app opens a handle e.g.:

gst-launch <something>

So after 'X' number of playbacks there won't be memory left.

> But if we did want to include them in stable then we would add a tag
> to the patch next to the Signed-off-by.

I thought first wait for inclusion and then send it to stable list,
given that there are other patches touching this file and I don't know
the order they are going to be picked, it is likely that I have to
rebase it given that I might be the last in the queue.

> Read Documentation/stable_kernel_rules.txt.  It's short.

I had read it before.

I don't mind these to sit outside stable tree if they are not required though.

Thanks,

Omar



More information about the devel mailing list