]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus: Fix a memory leak in DeleteService handler
authorJouni Malinen <j@w1.fi>
Mon, 4 Feb 2019 01:02:25 +0000 (03:02 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 4 Feb 2019 10:26:35 +0000 (12:26 +0200)
If the service_type string entry is not included, the dict entry was not
cleared.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/dbus/dbus_new_handlers_p2p.c

index 9f44f69ff8512e7cf31363b1cee09c648ed6b69d..2f00b2488a4d683e07e0ea4448edd217af45767e 100644 (file)
@@ -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)) {