[pulseaudio-discuss] [PATCH] bluez5: Fix free order of adapters and devices

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Nov 30 04:56:32 PST 2014


On Fri, 2014-11-28 at 13:43 +0100, David Henningsson wrote:
> Because the adapters reference the devices hashmap on free, we mush
> free the adapters hashmap first and then the devices hashmap.
> 
> Reported-by: Alexander Patrakov <patrakov at gmail.com>
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> ---
>  src/modules/bluetooth/bluez5-util.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Ack. I'd prefer first freeing the device and adapter objects, and only
then the hashmaps, though, because that way the discovery object doesn't
become invalid before all of the objects owned by it are freed, but if
you don't feel like doing that, I'm fine with this patch too.

-- 
Tanu



More information about the pulseaudio-discuss mailing list