dbus: Fix a NULL pointer dereference on error path

The cleanup routine in the end would have dereferenced props pointer
which could be NULL. There is no need to go through that cleanup code
in this case, so just exit from the function with return instead.
master
Jouni Malinen 15 years ago committed by Jouni Malinen
parent a1641d2671
commit 4f93ab0ffc

@ -3036,9 +3036,8 @@ DBusMessage * wpas_dbus_getter_network_properties(
if (!props) {
perror("wpas_dbus_getter_network_properties[dbus] couldn't "
"read network properties. out of memory.");
reply = dbus_message_new_error(message, DBUS_ERROR_NO_MEMORY,
NULL);
goto out;
return dbus_message_new_error(message, DBUS_ERROR_NO_MEMORY,
NULL);
}
if (message == NULL)

Loading…
Cancel
Save