From: Jouni Malinen Date: Mon, 4 Feb 2019 01:02:25 +0000 (+0200) Subject: D-Bus: Fix a memory leak in DeleteService handler X-Git-Tag: hostap_2_8~440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0607346f1270e25214dcf9eaa3c66decc805f34a;p=thirdparty%2Fhostap.git 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 --- 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)) {