From baf9ff34f1d2ca07dee71fd7574ace7215f627a3 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 20 Mar 2018 09:54:27 +0100 Subject: [PATCH] Fix null pointer dereferences in bus_connection_get_unix_groups Null-checking "groups" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Coverity ID 265358. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103737 --- bus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus/connection.c b/bus/connection.c index bcd4aef4..35f8e36e 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; -- 2.12.3