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
1 changed files with 1 additions and 0 deletions
|
@ -101,6 +101,7 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
|
|||
(entry.array_type != WPAS_DBUS_TYPE_BINARRAY))
|
||||
goto error_clear;
|
||||
|
||||
os_free(req_dev_types);
|
||||
req_dev_types =
|
||||
os_malloc(WPS_DEV_TYPE_LEN * entry.array_len);
|
||||
if (!req_dev_types)
|
||||
|
|
Loading…
Reference in a new issue