dbus: Fix a potential double-free in on error path (CID 62880)

It would have been at least theoretically possible to hit the first
error in the loop and end up jumping to error handling which would call
os_free(value) without the value having been cleared after the os_free()
call at the end of the previous loop iteration.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-06-12 17:26:58 +03:00
parent 68e2b8882a
commit ceb4cd89c9

View File

@ -271,6 +271,7 @@ dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s,
wpa_config_update_prio_list(wpa_s->conf);
os_free(value);
value = NULL;
wpa_dbus_dict_entry_clear(&entry);
}