projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86c6626
)
dbus: Fix potential memory leak with unexpected p2p_find calls
author
Jouni Malinen
<j@w1.fi>
Sun, 16 Oct 2011 10:19:33 +0000
(13:19 +0300)
committer
Jouni Malinen
<j@w1.fi>
Sun, 16 Oct 2011 10:19:33 +0000
(13:19 +0300)
Should the RequestedDeviceTypes entry show up multiple times, the
previously allocated buffer would have been leaked.
wpa_supplicant/dbus/dbus_new_handlers_p2p.c
patch
|
blob
|
history
diff --git
a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index
0ab7553
..
f2c5a18
100644
(file)
--- a/
wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/
wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@
-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)