Task #124978 - added.err

back to task #124978
download
Error: COMPILER_WARNING (CWE-563):
dbus-broker-37/src/util/sockopt.c: scope_hint: In function ‘sockopt_get_peergroups’
dbus-broker-37/src/util/sockopt.c:86:24: warning[-Wunused-variable]: unused variable ‘i’
#   86 |         int r, n_gids, i, j;
#      |                        ^
#   84|           _c_cleanup_(c_freep) gid_t *gids = NULL;
#   85|           socklen_t socklen;
#   86|->         int r, n_gids, i, j;
#   87|           void *tmp;
#   88|   

Error: CPPCHECK_WARNING (CWE-457):
dbus-broker-37/src/util/sockopt.c:135: error[uninitvar]: Uninitialized variable: j
#  133|                                           gids = tmp;
#  134|                           }
#  135|->                         n_gids = j + 1;
#  136|   
#  137|                           if (gidsp) {

Error: GCC_ANALYZER_WARNING (CWE-457):
dbus-broker-37/src/util/sockopt.c: scope_hint: In function ‘sockopt_get_peergroups’
dbus-broker-37/src/util/sockopt.c:135:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘j’
#  133|                                           gids = tmp;
#  134|                           }
#  135|->                         n_gids = j + 1;
#  136|   
#  137|                           if (gidsp) {

Error: CPPCHECK_WARNING (CWE-401):
dbus-broker-37/src/util/sockopt.c:163: error[memleak]: Memory leak: gids
#  161|                                                "resolution using nss.\n");
#  162|                           if (r)
#  163|->                                 return error_fold(r);
#  164|                   }
#  165|           }

Error: CPPCHECK_WARNING (CWE-401):
dbus-broker-37/src/util/sockopt.c:184: error[memleak]: Memory leak: gids
#  182|                   passwd = getpwuid(uid);
#  183|                   if (!passwd)
#  184|->                         return error_origin(-errno);
#  185|   
#  186|                   n_gids = 8;