diff options
author | Jouni Malinen <j@w1.fi> | 2010-01-01 12:27:10 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-01-01 12:27:10 +0200 |
commit | 21e210fc99137c06d6bb296138d13f75650d81a7 (patch) | |
tree | fbcb5534bf847a66af9aa0ef42c59b8c77938e5d /wpa_supplicant/dbus/dbus_new_helpers.c | |
parent | fcea0b7d1d4958ab370b90d39978fbed9a9716f7 (diff) | |
download | external_wpa_supplicant_8_ti-21e210fc99137c06d6bb296138d13f75650d81a7.zip external_wpa_supplicant_8_ti-21e210fc99137c06d6bb296138d13f75650d81a7.tar.gz external_wpa_supplicant_8_ti-21e210fc99137c06d6bb296138d13f75650d81a7.tar.bz2 |
dbus: Fix get_all_properties() to handle NULL return from getter
This needs to avoid trying to add the NULL entry into the D-Bus
message since libdbus will make the program terminate in such a case.
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_helpers.c')
-rw-r--r-- | wpa_supplicant/dbus/dbus_new_helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c index d3dbe53..e4829f2 100644 --- a/wpa_supplicant/dbus/dbus_new_helpers.c +++ b/wpa_supplicant/dbus/dbus_new_helpers.c @@ -648,6 +648,8 @@ static DBusMessage * get_all_properties( getterReply = property_dsc->getter( message, obj_dsc->user_data); + if (getterReply == NULL) + goto skip; dbus_message_iter_init(getterReply, &ret_iter); dbus_message_iter_open_container(&dict_iter, @@ -662,6 +664,7 @@ static DBusMessage * get_all_properties( dbus_message_iter_close_container(&dict_iter, &entry_iter); dbus_message_unref(getterReply); + skip: counter++; } property_dsc = property_dsc->next; |