From: Ralf Habacker Date: Tue, 20 Mar 2018 08:54:27 +0000 (+0100) Subject: bus_connection_get_unix_groups: NULL-check *groups, not groups X-Git-Tag: dbus-1.13.4~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c9f6ca79b8a327ee9d99d07ce2ed7b79c0ed21f;p=thirdparty%2Fdbus.git 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 --- diff --git a/bus/connection.c b/bus/connection.c index bcd4aef45..35f8e36ef 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -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;