Task #61673 - fixed.err

back to task #61673
download
Error: CPPCHECK_WARNING (CWE-476):
subscription-manager-1.30.7/src/daemons/rhsmcertd.c:715: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: config
#  713|   
#  714|       // Set the default values
#  715|->     config->auto_reg_interval_seconds = DEFAULT_AUTO_REG_INTERVAL_SECONDS;
#  716|       config->cert_interval_seconds = DEFAULT_CERT_INTERVAL_SECONDS;
#  717|       config->splay = DEFAULT_SPLAY_ENABLED;

Error: GCC_ANALYZER_WARNING (CWE-476):
subscription-manager-1.30.7/src/daemons/rhsmcertd.c: scope_hint: In function ‘get_config’
subscription-manager-1.30.7/src/daemons/rhsmcertd.c:715:39: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘config’
#  713|   
#  714|       // Set the default values
#  715|->     config->auto_reg_interval_seconds = DEFAULT_AUTO_REG_INTERVAL_SECONDS;
#  716|       config->cert_interval_seconds = DEFAULT_CERT_INTERVAL_SECONDS;
#  717|       config->splay = DEFAULT_SPLAY_ENABLED;