P2P: Fix memory leak in D-Bus p2p_find handler

This commit is contained in:
Jouni Malinen 2011-07-15 16:33:21 +03:00
parent e24b918202
commit 263ef84d3a

View file

@ -126,12 +126,13 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
} }
wpas_p2p_find(wpa_s, timeout, type, num_req_dev_types, req_dev_types); wpas_p2p_find(wpa_s, timeout, type, num_req_dev_types, req_dev_types);
os_free(req_dev_types);
return reply; return reply;
error_clear: error_clear:
os_free(req_dev_types);
wpa_dbus_dict_entry_clear(&entry); wpa_dbus_dict_entry_clear(&entry);
error: error:
os_free(req_dev_types);
reply = wpas_dbus_error_invalid_args(message, entry.key); reply = wpas_dbus_error_invalid_args(message, entry.key);
return reply; return reply;
} }