From e1739fb6171e87e8b5e8422ed28866f54044133c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 15 Jul 2011 14:39:07 +0300 Subject: [PATCH] P2P: Clear entry.key to avoid use of uninitialized value on error path --- wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c index e8bbc10a0..223af034a 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c @@ -85,6 +85,7 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message, u8 *req_dev_types = NULL; dbus_message_iter_init(message, &iter); + entry.key = NULL; if (!wpa_dbus_dict_open_read(&iter, &iter_dict)) goto error; @@ -192,6 +193,7 @@ DBusMessage * wpas_dbus_handler_p2p_extendedlisten( DBusMessageIter iter_dict; dbus_message_iter_init(message, &iter); + entry.key = NULL; if (!wpa_dbus_dict_open_read(&iter, &iter_dict)) goto error; @@ -233,6 +235,7 @@ DBusMessage * wpas_dbus_handler_p2p_presence_request( DBusMessageIter iter_dict; dbus_message_iter_init(message, &iter); + entry.key = NULL; if (!wpa_dbus_dict_open_read(&iter, &iter_dict)) goto error;