From 0607346f1270e25214dcf9eaa3c66decc805f34a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 4 Feb 2019 03:02:25 +0200 Subject: [PATCH] D-Bus: Fix a memory leak in DeleteService handler If the service_type string entry is not included, the dict entry was not cleared. Signed-off-by: Jouni Malinen --- wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c index 9f44f69ff..2f00b2488 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c @@ -2705,8 +2705,9 @@ DBusMessage * wpas_dbus_handler_p2p_delete_service( bonjour = 1; else goto error_clear; - wpa_dbus_dict_entry_clear(&entry); } + + wpa_dbus_dict_entry_clear(&entry); } if (upnp == 1) { while (wpa_dbus_dict_has_dict_entry(&iter_dict)) {