Task #37858 - fixed.err
back to task #37858download
Error: GCC_ANALYZER_WARNING (CWE-476):
subscription-manager-1.30.5-build/subscription-manager-1.30.5/src/plugins/libdnf/product-id.c: scope_hint: In function ‘initRepoProductId’
subscription-manager-1.30.5-build/subscription-manager-1.30.5/src/plugins/libdnf/product-id.c:165:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘repoProductId’
subscription-manager-1.30.5-build/subscription-manager-1.30.5/src/plugins/libdnf/product-id.c:15: included_from: Included from here.
/usr/include/glib-2.0/glib.h:33: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
/usr/include/libdnf/dnf-types.h:27: included_from: Included from here.
/usr/include/libdnf/plugin/plugin.h:24: included_from: Included from here.
# 163| RepoProductId *initRepoProductId(void) {
# 164| RepoProductId *repoProductId = (RepoProductId*) malloc(sizeof(RepoProductId));
# 165|-> repoProductId->repo = NULL;
# 166| repoProductId->productIdPath = NULL;
# 167| repoProductId->isInstalled = FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
subscription-manager-1.30.5-build/subscription-manager-1.30.5/src/plugins/libdnf/productdb.c: scope_hint: In function ‘initProductDb’
subscription-manager-1.30.5-build/subscription-manager-1.30.5/src/plugins/libdnf/productdb.c:34:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘productDb’
# 32| ProductDb *initProductDb() {
# 33| ProductDb *productDb = malloc(sizeof(ProductDb));
# 34|-> productDb->path = NULL;
# 35| // We do not provide method for freeing value, because it would be ineficient to
# 36| // free and recreate GSList everytime we add/remove item in the list