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.
This commit is contained in:
parent
a1641d2671
commit
4f93ab0ffc
1 changed files with 2 additions and 3 deletions
|
@ -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…
Reference in a new issue