mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-29 08:14:02 -05:00
dbus: Fix potential memory leak with unexpected p2p_find calls
Should the RequestedDeviceTypes entry show up multiple times, the previously allocated buffer would have been leaked.
This commit is contained in:
parent
86c6626c5b
commit
b02897e70b
@ -101,6 +101,7 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
|
|||||||
(entry.array_type != WPAS_DBUS_TYPE_BINARRAY))
|
(entry.array_type != WPAS_DBUS_TYPE_BINARRAY))
|
||||||
goto error_clear;
|
goto error_clear;
|
||||||
|
|
||||||
|
os_free(req_dev_types);
|
||||||
req_dev_types =
|
req_dev_types =
|
||||||
os_malloc(WPS_DEV_TYPE_LEN * entry.array_len);
|
os_malloc(WPS_DEV_TYPE_LEN * entry.array_len);
|
||||||
if (!req_dev_types)
|
if (!req_dev_types)
|
||||||
|
Loading…
Reference in New Issue
Block a user