[PATCH] D-Bus: Fix memory leak when using array of array of bytes

Jouni Malinen j
Wed Sep 21 15:02:20 PDT 2011


On Fri, Aug 26, 2011 at 04:55:29PM -0700, Angie Chinchilla wrote:
> When parsing a dict entry which is an array of an array of bytes the entry
> representing the dict entry has DBUS_TYPE_ARRAY as its type and
> WPAS_DBUS_TYPE_ARRAY as its array_type. The function freeing this parsed
> data incorrectly tested the entry type for WPAS_DBUS_TYPE_ARRAY while doing
> no testing of this value for array_type. This results in a memory leak
> whenever a D-Bus message with this type of data is parsed.

> All of the above messages are parsed with the same function,
> wpa_dbus_dict_get_entry, so the assignment of the entry's type and
> array_type is consistent. The parsed data is also consistently freed with
> the same function, wpa_dbus_dict_entry_clear, so we can use the same checks
> to free the data correctly.

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list