bus_connection_get_unix_groups: NULL-check *groups, not groups

groups is never NULL here, but *groups can be NULL on OOM, and that's the
check that was intended.

Coverity ID 265358.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103737
Reviewed-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Ralf Habacker 2018-03-20 09:54:27 +01:00
parent a3bc4392be
commit 7c9f6ca79b

View file

@ -1064,7 +1064,7 @@ bus_connection_get_unix_groups (DBusConnection *connection,
*n_groups = n;
*groups = dbus_new (unsigned long, n);
if (groups == NULL)
if (*groups == NULL)
{
BUS_SET_OOM (error);
return FALSE;