From f0614bc6c6eb579a4246703d950b56aea66cb385 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 6 Jan 2015 13:22:06 +0200 Subject: [PATCH] D-Bus (old): Fix message handler error paths The error reply needs to be sent out as a response. The "out" label was in incorrect place to allow that to happen; instead, it ended up leaking memory for the generated reply message. Signed-off-by: Jouni Malinen --- wpa_supplicant/dbus/dbus_old.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/dbus/dbus_old.c b/wpa_supplicant/dbus/dbus_old.c index 289913223..1c8568688 100644 --- a/wpa_supplicant/dbus/dbus_old.c +++ b/wpa_supplicant/dbus/dbus_old.c @@ -292,13 +292,13 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection, } /* If the message was handled, send back the reply */ +out: if (reply) { if (!dbus_message_get_no_reply(message)) dbus_connection_send(connection, reply, NULL); dbus_message_unref(reply); } -out: os_free(iface_obj_path); os_free(network); os_free(bssid);