2009-03-26 23:50:01

by Nick Pelly

[permalink] [raw]

2009-03-27 09:49:21

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Null pointer check on cb in finalize_resume()

Hi Nick,

Thanks for the patches. All of them, except for this one, seemed fine.

On Thu, Mar 26, 2009, Nick Pelly wrote:
> From: Nick Pelly <[email protected]>
> Date: Thu, 26 Mar 2009 15:22:32 -0700
> Subject: [PATCH] Null pointer check on cb in finalize_resume().
> Fix a null pointer crash that occured when resuming A2DP streaming after
> making an outgoing call.

This looks like it's covering up for another bug where we've added a NULL
element into the list. I went through the current code and there are two places
where elements are added to the list. Both of these places use g_new0 which
will never return NULL (the default GLib behavior or to call abort() in the
case of an allocation failure) so most likely this added NULL check is
unnecessary with the current code base (but of course doesn't really hurt