aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
diff options
context:
space:
mode:
authorEduardo Abinader <eduardo.abinader@openbossa.org>2014-08-03 22:48:15 (GMT)
committerJouni Malinen <j@w1.fi>2014-08-10 08:29:49 (GMT)
commit4aa9c156e583c64cf5d90751ec888c478e1155c2 (patch)
treebf96bdaebc952bfcaadc1f963a846f77ee0e06fe /wpa_supplicant/dbus/dbus_new_handlers_p2p.c
parentb8d87ed296fa30116665bf99242304635745f01c (diff)
downloadhostap-4aa9c156e583c64cf5d90751ec888c478e1155c2.zip
hostap-4aa9c156e583c64cf5d90751ec888c478e1155c2.tar.gz
hostap-4aa9c156e583c64cf5d90751ec888c478e1155c2.tar.bz2
dbus: Close dbus dict just after appending data
Before fixing this issue, calling wpas_dbus_getter_p2p_device_config was causing early termination of dbus connection, due to writing values to an already closed dict. Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers_p2p.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers_p2p.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 516551a..c9ecc7b 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -830,15 +830,15 @@ dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter,
wpa_s->conf->p2p_no_group_iface))
goto err_no_mem;
- if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) ||
- !dbus_message_iter_close_container(iter, &variant_iter))
- goto err_no_mem;
-
/* P2P Search Delay */
if (!wpa_dbus_dict_append_uint32(&dict_iter, "p2p_search_delay",
wpa_s->conf->p2p_search_delay))
goto err_no_mem;
+ if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) ||
+ !dbus_message_iter_close_container(iter, &variant_iter))
+ goto err_no_mem;
+
return TRUE;
err_no_mem: