mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-07 17:58:39 +02:00
auth_set_unix_credentials: Fix calling _dbus_credentials_add_pid without checking return value (CID 54708).
Reported by Coverity: CID 54708: Unchecked return value (CHECKED_RETURN) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
8b5788b2c2
commit
84b2682eef
1 changed files with 4 additions and 2 deletions
|
|
@ -226,8 +226,10 @@ auth_set_unix_credentials(DBusAuth *auth,
|
|||
_dbus_assert_not_reached ("no memory");
|
||||
}
|
||||
if (pid != DBUS_PID_UNSET)
|
||||
_dbus_credentials_add_pid (credentials, pid);
|
||||
|
||||
{
|
||||
if (!_dbus_credentials_add_pid (credentials, pid))
|
||||
_dbus_assert_not_reached ("no memory");
|
||||
}
|
||||
_dbus_auth_set_credentials (auth, credentials);
|
||||
|
||||
_dbus_credentials_unref (credentials);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue