aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_old_handlers.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-02 15:17:00 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-02 15:17:00 (GMT)
commit3e87bd5478595af09d51bfe58ed166d2dfbb6b7b (patch)
tree65e5f40aa81444d836a920a917a5ab6844adf188 /wpa_supplicant/dbus/dbus_old_handlers.c
parent8f770587d9b5995140860e772a17a1ba83e07783 (diff)
downloadhostap-3e87bd5478595af09d51bfe58ed166d2dfbb6b7b.zip
hostap-3e87bd5478595af09d51bfe58ed166d2dfbb6b7b.tar.gz
hostap-3e87bd5478595af09d51bfe58ed166d2dfbb6b7b.tar.bz2
dbus: Use stack for temporary object path
This is small enough buffer to not require more complex dynamic allocation for temporary use.
Diffstat (limited to 'wpa_supplicant/dbus/dbus_old_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_old_handlers.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/wpa_supplicant/dbus/dbus_old_handlers.c b/wpa_supplicant/dbus/dbus_old_handlers.c
index f9d3bcd..8e1f7b0 100644
--- a/wpa_supplicant/dbus/dbus_old_handlers.c
+++ b/wpa_supplicant/dbus/dbus_old_handlers.c
@@ -787,14 +787,7 @@ DBusMessage * wpas_dbus_iface_add_network(DBusMessage *message,
{
DBusMessage *reply = NULL;
struct wpa_ssid *ssid;
- char *path = NULL;
-
- path = os_zalloc(WPAS_DBUS_OBJECT_PATH_MAX);
- if (path == NULL) {
- wpa_printf(MSG_ERROR, "dbus: Not enough memory to send scan "
- "results signal");
- goto out;
- }
+ char path_buf[WPAS_DBUS_OBJECT_PATH_MAX], *path = path_buf;
ssid = wpa_config_add_network(wpa_s->conf);
if (ssid == NULL) {
@@ -818,7 +811,6 @@ DBusMessage * wpas_dbus_iface_add_network(DBusMessage *message,
&path, DBUS_TYPE_INVALID);
out:
- os_free(path);
return reply;
}