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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux