Error: CPPCHECK_WARNING (CWE-401): [#def1] clinfo-3.0.25.02.14/src/clinfo.c:1009: error[memleakOnRealloc]: Common realloc mistake: 'ext' nulled but not freed upon failure # 1007| loc, "get %s size"); # 1008| if (!ret->err) { # 1009|-> REALLOC(ext, nusz, loc->sname); # 1010| ret->err = REPORT_ERROR_LOC(ret, # 1011| clGetPlatformInfo(loc->plat, loc->param.plat, nusz, ext, NULL), Error: CPPCHECK_WARNING (CWE-401): [#def2] clinfo-3.0.25.02.14/src/clinfo.c:1032: error[memleakOnRealloc]: Common realloc mistake: 'ext' nulled but not freed upon failure # 1030| loc, "get %s size"); # 1031| if (!ret->err) { # 1032|-> REALLOC(ext, nusz, loc->sname); # 1033| ret->err = REPORT_ERROR_LOC(ret, # 1034| clGetPlatformInfo(loc->plat, loc->param.plat, nusz, ext, NULL), Error: CPPCHECK_WARNING (CWE-401): [#def3] clinfo-3.0.25.02.14/src/clinfo.c:1055: error[memleakOnRealloc]: Common realloc mistake: 'ext' nulled but not freed upon failure # 1053| loc, "get %s size"); # 1054| if (!ret->err) { # 1055|-> REALLOC(ext, nusz, loc->sname); # 1056| ret->err = REPORT_ERROR_LOC(ret, # 1057| clGetPlatformInfo(loc->plat, loc->param.plat, nusz, ext, NULL), Error: CPPCHECK_WARNING (CWE-401): [#def4] clinfo-3.0.25.02.14/src/clinfo.c:1078: error[memleakOnRealloc]: Common realloc mistake: 'ext' nulled but not freed upon failure # 1076| loc, "get %s size"); # 1077| if (!ret->err) { # 1078|-> REALLOC(ext, nusz, loc->sname); # 1079| ret->err = REPORT_ERROR_LOC(ret, # 1080| clGetPlatformInfo(loc->plat, loc->param.plat, nusz, ext, NULL), Error: CPPCHECK_WARNING (CWE-401): [#def5] clinfo-3.0.25.02.14/src/clinfo.c:1790: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1788| cl_name_version *val = NULL; # 1789| size_t szval = 0, numval = 0; # 1790|-> GET_VAL_ARRAY(ret, loc); # 1791| if (!ret->err) { # 1792| strbuf_name_version(loc->pname, &ret->str, val, numval, output); Error: CPPCHECK_WARNING (CWE-401): [#def6] clinfo-3.0.25.02.14/src/clinfo.c:1804: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1802| cl_external_memory_handle_type_khr *val = NULL; # 1803| size_t szval = 0, numval = 0; # 1804|-> GET_VAL_ARRAY(ret, loc); # 1805| if (!ret->err) { # 1806| strbuf_ext_mem(loc->pname, &ret->str, val, numval, output); Error: CPPCHECK_WARNING (CWE-401): [#def7] clinfo-3.0.25.02.14/src/clinfo.c:1818: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1816| cl_semaphore_type_khr *val = NULL; # 1817| size_t szval = 0, numval = 0; # 1818|-> GET_VAL_ARRAY(ret, loc); # 1819| if (!ret->err) { # 1820| strbuf_semaphore_type(loc->pname, &ret->str, val, numval, output); Error: CPPCHECK_WARNING (CWE-401): [#def8] clinfo-3.0.25.02.14/src/clinfo.c:1832: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1830| cl_external_semaphore_handle_type_khr *val = NULL; # 1831| size_t szval = 0, numval = 0; # 1832|-> GET_VAL_ARRAY(ret, loc); # 1833| if (!ret->err) { # 1834| strbuf_ext_semaphore_handle(loc->pname, &ret->str, val, numval, output); Error: GCC_ANALYZER_WARNING (CWE-126): [#def9] clinfo-3.0.25.02.14/src/clinfo.c:1847:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read clinfo-3.0.25.02.14/src/clinfo.c:1890:1: enter_function: entry to ‘device_info_free_mem_amd’ clinfo-3.0.25.02.14/src/clinfo.c:1903:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:1904:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:1904:25: call_function: calling ‘strbuf_append_str_len’ from ‘device_info_free_mem_amd’ clinfo-3.0.25.02.14/src/clinfo.c:1904:25: return_function: returning to ‘device_info_free_mem_amd’ from ‘strbuf_append_str_len’ clinfo-3.0.25.02.14/src/clinfo.c:1905:34: branch_true: following ‘true’ branch (when ‘cursor != 2’)... clinfo-3.0.25.02.14/src/clinfo.c:1906:34: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:1907:28: branch_false: following ‘false’ branch (when ‘cursor == 0’)... clinfo-3.0.25.02.14/src/clinfo.c:1910:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:1910:25: call_function: calling ‘strbuf_append’ from ‘device_info_free_mem_amd’ clinfo-3.0.25.02.14/src/clinfo.c:1910:25: return_function: returning to ‘device_info_free_mem_amd’ from ‘strbuf_append’ clinfo-3.0.25.02.14/src/clinfo.c:1911:28: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:1912:67: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:1912:33: call_function: calling ‘strbuf_mem’ from ‘device_info_free_mem_amd’ # 1845| ++sfx; # 1846| } # 1847|-> strbuf_append(what, str, " (%.4lg%s)", dbl, memsfx[sfx]); # 1848| } # 1849| Error: CPPCHECK_WARNING (CWE-401): [#def10] clinfo-3.0.25.02.14/src/clinfo.c:1941: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1939| cl_int *val = NULL; # 1940| size_t szval = 0, numval = 0; # 1941|-> GET_VAL_ARRAY(ret, loc); # 1942| if (!ret->err) { # 1943| size_t counter = 0; Error: CPPCHECK_WARNING (CWE-401): [#def11] clinfo-3.0.25.02.14/src/clinfo.c:1965: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 1963| size_t *val = NULL; # 1964| size_t szval = 0, numval = 0; # 1965|-> GET_VAL_ARRAY(ret, loc); # 1966| if (!ret->err) { # 1967| size_t counter = 0; Error: CPPCHECK_WARNING (CWE-401): [#def12] clinfo-3.0.25.02.14/src/clinfo.c:2598: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 2596| partition_type_str : partition_type_raw_str); # 2597| # 2598|-> GET_VAL_ARRAY(ret, loc); # 2599| # 2600| if (!ret->err) { Error: CPPCHECK_WARNING (CWE-401): [#def13] clinfo-3.0.25.02.14/src/clinfo.c:2651: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 2649| partition_type_str : partition_type_raw_str); # 2650| # 2651|-> GET_VAL_ARRAY(ret, loc); # 2652| # 2653| if (!ret->err) { Error: CPPCHECK_WARNING (CWE-401): [#def14] clinfo-3.0.25.02.14/src/clinfo.c:2716: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 2714| affinity_domain_ext_str : affinity_domain_raw_ext_str); # 2715| # 2716|-> GET_VAL_ARRAY(ret, loc); # 2717| # 2718| if (!ret->err) { Error: CPPCHECK_WARNING (CWE-401): [#def15] clinfo-3.0.25.02.14/src/clinfo.c:3031: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 3029| cl_queue_family_properties_intel *val = NULL; # 3030| size_t szval = 0, numval = 0; # 3031|-> GET_VAL_ARRAY(ret, loc); # 3032| if (!ret->err) { # 3033| strbuf_intel_queue_family(loc->pname, &ret->str, val, numval, output); Error: CPPCHECK_WARNING (CWE-401): [#def16] clinfo-3.0.25.02.14/src/clinfo.c:3200: error[memleakOnRealloc]: Common realloc mistake: 'val' nulled but not freed upon failure # 3198| cl_uint *val = NULL; # 3199| size_t szval = 0, numval = 0; # 3200|-> GET_VAL_ARRAY(ret, loc); # 3201| if (!ret->err) { # 3202| size_t cursor = 0; Error: CPPCHECK_WARNING (CWE-401): [#def17] clinfo-3.0.25.02.14/src/clinfo.c:4036: error[memleakOnRealloc]: Common realloc mistake: 'line_pfx' nulled but not freed upon failure # 4034| if (str.buf[0]) { # 4035| line_pfx_len = (int)(strlen(str.buf) + 1); # 4036|-> REALLOC(line_pfx, line_pfx_len, "line prefix"); # 4037| reset_strbuf(&str); # 4038| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] clinfo-3.0.25.02.14/src/clinfo.c:4094:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ # 4092| RESET_LOC_PARAM(loc, plat, CL_PLATFORM_NAME); # 4093| # 4094|-> ret.err = clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ret.str.sz, ret.str.buf, NULL); # 4095| if (ret.err == CL_INVALID_PLATFORM) { # 4096| strbuf_append(__func__, &ret.err_str, no_plat(output)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] clinfo-3.0.25.02.14/src/clinfo.c:4094:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ # 4092| RESET_LOC_PARAM(loc, plat, CL_PLATFORM_NAME); # 4093| # 4094|-> ret.err = clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ret.str.sz, ret.str.buf, NULL); # 4095| if (ret.err == CL_INVALID_PLATFORM) { # 4096| strbuf_append(__func__, &ret.err_str, no_plat(output)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] clinfo-3.0.25.02.14/src/clinfo.c:4133:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4131| loc.sname = "device IDs"; # 4132| # 4133|-> ret.err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 0, NULL, &numdevs); # 4134| /* TODO we should check other CL_DEVICE_TYPE_* combinations, since a smart # 4135| * implementation might give you a different default platform for GPUs Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] clinfo-3.0.25.02.14/src/clinfo.c:4133:19: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4131| loc.sname = "device IDs"; # 4132| # 4133|-> ret.err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 0, NULL, &numdevs); # 4134| /* TODO we should check other CL_DEVICE_TYPE_* combinations, since a smart # 4135| * implementation might give you a different default platform for GPUs Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] clinfo-3.0.25.02.14/src/clinfo.c:4190:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4188| /* Determine platform by looking at the CL_DEVICE_PLATFORM of # 4189| * one of the devices */ # 4190|-> ret.err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 1, &dev, NULL); # 4191| loc.line = __LINE__+1; # 4192| if (REPORT_ERROR_LOC(&ret, ret.err, &loc, "get %s")) break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] clinfo-3.0.25.02.14/src/clinfo.c:4190:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4188| /* Determine platform by looking at the CL_DEVICE_PLATFORM of # 4189| * one of the devices */ # 4190|-> ret.err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 1, &dev, NULL); # 4191| loc.line = __LINE__+1; # 4192| if (REPORT_ERROR_LOC(&ret, ret.err, &loc, "get %s")) break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] clinfo-3.0.25.02.14/src/clinfo.c:4195:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4193| # 4194| RESET_LOC_PARAM(loc, dev, CL_DEVICE_PLATFORM); # 4195|-> ret.err = clGetDeviceInfo(dev, CL_DEVICE_PLATFORM, # 4196| sizeof(plat), &plat, NULL); # 4197| loc.line = __LINE__+1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] clinfo-3.0.25.02.14/src/clinfo.c:4195:27: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ # 4193| # 4194| RESET_LOC_PARAM(loc, dev, CL_DEVICE_PLATFORM); # 4195|-> ret.err = clGetDeviceInfo(dev, CL_DEVICE_PLATFORM, # 4196| sizeof(plat), &plat, NULL); # 4197| loc.line = __LINE__+1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] clinfo-3.0.25.02.14/src/clinfo.c:4227:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetDevices’ clinfo-3.0.25.02.14/src/clinfo.c:4394:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4397:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4397:19: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4402:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4402:25: call_function: calling ‘checkNullCtx’ from ‘checkNullBehavior’ # 4225| const cl_device_id *dev = plist->all_devs + plist->dev_offset[pidx]; # 4226| struct info_loc loc; # 4227|-> cl_context ctx = clCreateContext(NULL, 1, dev, NULL, NULL, &ret->err); # 4228| # 4229| reset_loc(&loc, __func__); Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] clinfo-3.0.25.02.14/src/clinfo.c:4227:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetDevices’ clinfo-3.0.25.02.14/src/clinfo.c:4394:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4397:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4397:19: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4402:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4402:25: call_function: calling ‘checkNullCtx’ from ‘checkNullBehavior’ # 4225| const cl_device_id *dev = plist->all_devs + plist->dev_offset[pidx]; # 4226| struct info_loc loc; # 4227|-> cl_context ctx = clCreateContext(NULL, 1, dev, NULL, NULL, &ret->err); # 4228| # 4229| reset_loc(&loc, __func__); Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] clinfo-3.0.25.02.14/src/clinfo.c:4285:23: warning[-Wanalyzer-malloc-leak]: leak of ‘devs’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetDevices’ clinfo-3.0.25.02.14/src/clinfo.c:4394:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4397:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4397:19: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4402:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4402:25: call_function: calling ‘checkNullCtx’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4402:25: return_function: returning to ‘checkNullBehavior’ from ‘checkNullCtx’ clinfo-3.0.25.02.14/src/clinfo.c:4409:71: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4409:9: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4428:9: call_function: calling ‘checkNullCtxFromType’ from ‘checkNullBehavior’ # 4283| # 4284| loc.line = __LINE__+1; # 4285|-> ctx = clCreateContextFromType(NULL, devtype[t], NULL, NULL, &ret.err); # 4286| # 4287| switch (ret.err) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] clinfo-3.0.25.02.14/src/clinfo.c:4285:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.err_str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetDevices’ clinfo-3.0.25.02.14/src/clinfo.c:4394:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4397:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4397:19: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4402:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4402:25: call_function: calling ‘checkNullCtx’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4402:25: return_function: returning to ‘checkNullBehavior’ from ‘checkNullCtx’ clinfo-3.0.25.02.14/src/clinfo.c:4409:71: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4409:9: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4428:9: call_function: calling ‘checkNullCtxFromType’ from ‘checkNullBehavior’ # 4283| # 4284| loc.line = __LINE__+1; # 4285|-> ctx = clCreateContextFromType(NULL, devtype[t], NULL, NULL, &ret.err); # 4286| # 4287| switch (ret.err) { Error: CPPCHECK_WARNING (CWE-401): [#def30] clinfo-3.0.25.02.14/src/clinfo.c:4308: error[memleakOnRealloc]: Common realloc mistake: 'devs' nulled but not freed upon failure # 4306| if (REPORT_ERROR_LOC(&ret, ret.err, &loc, "get %s size")) break; # 4307| if (szval > cursz) { # 4308|-> REALLOC(devs, szval, "context devices"); # 4309| cursz = szval; # 4310| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] clinfo-3.0.25.02.14/src/clinfo.c:4362:25: warning[-Wanalyzer-malloc-leak]: leak of ‘devs’ clinfo-3.0.25.02.14/src/clinfo.c:4375:6: enter_function: entry to ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: call_function: calling ‘init_strbuf’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4383:9: return_function: returning to ‘checkNullBehavior’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: call_function: calling ‘checkNullGetPlatformName’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4387:9: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetPlatformName’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: call_function: calling ‘checkNullGetDevices’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4389:13: return_function: returning to ‘checkNullBehavior’ from ‘checkNullGetDevices’ clinfo-3.0.25.02.14/src/clinfo.c:4394:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4397:25: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4397:19: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4401:20: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4402:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4402:25: call_function: calling ‘checkNullCtx’ from ‘checkNullBehavior’ clinfo-3.0.25.02.14/src/clinfo.c:4402:25: return_function: returning to ‘checkNullBehavior’ from ‘checkNullCtx’ clinfo-3.0.25.02.14/src/clinfo.c:4409:71: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4409:9: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4428:9: call_function: calling ‘checkNullCtxFromType’ from ‘checkNullBehavior’ # 4360| # 4361| if (ctx) { # 4362|-> clReleaseContext(ctx); # 4363| ctx = NULL; # 4364| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] clinfo-3.0.25.02.14/src/clinfo.c:4518:25: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4811:9: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4814:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4814:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4817:9: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4817:21: branch_false: following ‘false’ branch (when ‘p >= alloced_platforms’)... clinfo-3.0.25.02.14/src/clinfo.c:4845:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4845:12: branch_false: following ‘false’ branch (when ‘alloced_platforms == 0’)... clinfo-3.0.25.02.14/src/clinfo.c:4853:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4853:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4856:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4856:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4857:21: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4857:20: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4859:17: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4859:17: call_function: calling ‘oclIcdProps’ from ‘main’ # 4516| * loader itself, not in a specific platform. # 4517| */ # 4518|-> void *ptrHack = clGetExtensionFunctionAddress("clGetICDLoaderInfoOCLICD"); # 4519| clGetICDLoaderInfoOCLICD = *(icdl_info_fn_ptr*)(&ptrHack); # 4520| Error: CPPCHECK_WARNING (CWE-401): [#def33] clinfo-3.0.25.02.14/src/clinfo.c:4552: error[memleakOnRealloc]: Common realloc mistake: 'line_pfx' nulled but not freed upon failure # 4550| } else if (output->mode == CLINFO_RAW) { # 4551| line_pfx_len = (int)(strlen(oclicdl_pfx) + 5); # 4552|-> REALLOC(line_pfx, line_pfx_len, "line prefix OCL ICD"); # 4553| strbuf_append(loc.pname, &ret.str, "[%s/*]", oclicdl_pfx); # 4554| sprintf(line_pfx, "%*s", -line_pfx_len, ret.str.buf); Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] clinfo-3.0.25.02.14/src/clinfo.c:4794:15: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4794:15: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4794:15: danger: ‘output.selected_props[0]’ leaks here; was allocated at [(29)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/28) # 4792| output.detailed = !output.brief && !output.num_selected_devices && !output.num_selected_props; # 4793| # 4794|-> err = clGetPlatformIDs(0, NULL, &plist.num_platforms); # 4795| if (err != CL_PLATFORM_NOT_FOUND_KHR) # 4796| CHECK_ERROR(err, "number of platforms"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] clinfo-3.0.25.02.14/src/clinfo.c:4807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4805:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4806:37: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4806:37: call_function: calling ‘alloc_plist’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4806:37: return_function: returning to ‘main’ from ‘alloc_plist’ clinfo-3.0.25.02.14/src/clinfo.c:4807:23: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4807:23: danger: ‘output.selected_props[0]’ leaks here; was allocated at [(29)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/28) # 4805| if (plist.num_platforms) { # 4806| alloced_platforms = alloc_plist(&plist, &output); # 4807|-> err = clGetPlatformIDs(plist.num_platforms, plist.platform, NULL); # 4808| CHECK_ERROR(err, "platform IDs"); # 4809| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] clinfo-3.0.25.02.14/src/clinfo.c:4807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘plist.dev_offset’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4805:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4806:37: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4806:37: call_function: calling ‘alloc_plist’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4806:37: return_function: returning to ‘main’ from ‘alloc_plist’ clinfo-3.0.25.02.14/src/clinfo.c:4807:23: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4807:23: danger: ‘plist.dev_offset’ leaks here; was allocated at [(57)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/56) # 4805| if (plist.num_platforms) { # 4806| alloced_platforms = alloc_plist(&plist, &output); # 4807|-> err = clGetPlatformIDs(plist.num_platforms, plist.platform, NULL); # 4808| CHECK_ERROR(err, "platform IDs"); # 4809| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] clinfo-3.0.25.02.14/src/clinfo.c:4807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘plist.pdata’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4805:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4806:37: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4806:37: call_function: calling ‘alloc_plist’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4806:37: return_function: returning to ‘main’ from ‘alloc_plist’ clinfo-3.0.25.02.14/src/clinfo.c:4807:23: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4807:23: danger: ‘plist.pdata’ leaks here; was allocated at [(64)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/63) # 4805| if (plist.num_platforms) { # 4806| alloced_platforms = alloc_plist(&plist, &output); # 4807|-> err = clGetPlatformIDs(plist.num_platforms, plist.platform, NULL); # 4808| CHECK_ERROR(err, "platform IDs"); # 4809| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] clinfo-3.0.25.02.14/src/clinfo.c:4807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘plist.platform_checks’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4805:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4806:37: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4806:37: call_function: calling ‘alloc_plist’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4806:37: return_function: returning to ‘main’ from ‘alloc_plist’ clinfo-3.0.25.02.14/src/clinfo.c:4807:23: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4807:23: danger: ‘plist.platform_checks’ leaks here; was allocated at [(66)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/65) # 4805| if (plist.num_platforms) { # 4806| alloced_platforms = alloc_plist(&plist, &output); # 4807|-> err = clGetPlatformIDs(plist.num_platforms, plist.platform, NULL); # 4808| CHECK_ERROR(err, "platform IDs"); # 4809| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] clinfo-3.0.25.02.14/src/clinfo.c:4807:23: warning[-Wanalyzer-malloc-leak]: leak of ‘plist.platform’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4798:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4805:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4805:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4806:37: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4806:37: call_function: calling ‘alloc_plist’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4806:37: return_function: returning to ‘main’ from ‘alloc_plist’ clinfo-3.0.25.02.14/src/clinfo.c:4807:23: throw: if ‘clGetPlatformIDs’ throws an exception... clinfo-3.0.25.02.14/src/clinfo.c:4807:23: danger: ‘plist.platform’ leaks here; was allocated at [(55)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/54) # 4805| if (plist.num_platforms) { # 4806| alloced_platforms = alloc_plist(&plist, &output); # 4807|-> err = clGetPlatformIDs(plist.num_platforms, plist.platform, NULL); # 4808| CHECK_ERROR(err, "platform IDs"); # 4809| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] clinfo-3.0.25.02.14/src/error.h:17:17: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4795:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4796:17: call_function: inlined call to ‘check_ocl_error’ from ‘main’ # 15| { # 16| if (err != CL_SUCCESS) { # 17|-> fflush(stdout); # 18| fflush(stderr); # 19| fprintf(stderr, "%s:%u: %s : error %d\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] clinfo-3.0.25.02.14/src/error.h:18:17: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4795:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4796:17: call_function: inlined call to ‘check_ocl_error’ from ‘main’ # 16| if (err != CL_SUCCESS) { # 17| fflush(stdout); # 18|-> fflush(stderr); # 19| fprintf(stderr, "%s:%u: %s : error %d\n", # 20| func, line, what, err); Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] clinfo-3.0.25.02.14/src/error.h:21:17: warning[-Wanalyzer-malloc-leak]: leak of ‘output.selected_props[0]’ clinfo-3.0.25.02.14/src/clinfo.c:4724:5: enter_function: entry to ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4746:12: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_true: following ‘true’ branch (when ‘a < argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4751:33: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4753:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4755:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4757:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4757:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4759:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4759:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4761:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4761:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4763:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4763:25: branch_false: following ‘false’ branch (when the strings are non-equal)... clinfo-3.0.25.02.14/src/clinfo.c:4765:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4765:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4767:25: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4770:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4772:29: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4772:27: branch_true: following ‘true’ branch (when the strings are equal)... clinfo-3.0.25.02.14/src/clinfo.c:4773:25: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4774:25: call_function: calling ‘parse_prop’ from ‘main’ clinfo-3.0.25.02.14/src/clinfo.c:4774:25: return_function: returning to ‘main’ from ‘parse_prop’ clinfo-3.0.25.02.14/src/clinfo.c:4750:16: branch_false: following ‘false’ branch (when ‘a >= argc’)... clinfo-3.0.25.02.14/src/clinfo.c:4790:13: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4790:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4791:17: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: following ‘false’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4792:27: branch_false: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4795:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4796:17: call_function: inlined call to ‘check_ocl_error’ from ‘main’ # 19| fprintf(stderr, "%s:%u: %s : error %d\n", # 20| func, line, what, err); # 21|-> fflush(stderr); # 22| } # 23| return err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] clinfo-3.0.25.02.14/src/strbuf.h:26:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ret.str.buf’ clinfo-3.0.25.02.14/src/clinfo.c:4496:18: enter_function: entry to ‘oclIcdProps’ clinfo-3.0.25.02.14/src/clinfo.c:4528:20: branch_true: following ‘true’ branch (when ‘<unknown>’ is NULL)... clinfo-3.0.25.02.14/src/clinfo.c:4537:13: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4537:12: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4541:17: call_function: inlined call to ‘reset_loc’ from ‘oclIcdProps’ clinfo-3.0.25.02.14/src/clinfo.c:4542:17: call_function: calling ‘init_strbuf’ from ‘oclIcdProps’ clinfo-3.0.25.02.14/src/clinfo.c:4542:17: return_function: returning to ‘oclIcdProps’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4542:17: call_function: calling ‘init_strbuf’ from ‘oclIcdProps’ clinfo-3.0.25.02.14/src/clinfo.c:4542:17: return_function: returning to ‘oclIcdProps’ from ‘init_strbuf’ clinfo-3.0.25.02.14/src/clinfo.c:4558:36: branch_true: following ‘true’ branch... clinfo-3.0.25.02.14/src/clinfo.c:4559:78: branch_true: ...to here clinfo-3.0.25.02.14/src/clinfo.c:4570:25: call_function: calling ‘icdl_info_str’ from ‘oclIcdProps’ # 24| { # 25| if (nusz > str->sz) { # 26|-> REALLOC(str->buf, nusz, what); # 27| str->sz = nusz; # 28| }
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-64.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | clinfo-3.0.25.02.14-1.fc44 |
| store-results-to | /tmp/tmpgwffrh3n/clinfo-3.0.25.02.14-1.fc44.tar.xz |
| time-created | 2026-01-08 15:42:09 |
| time-finished | 2026-01-08 15:43:31 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpgwffrh3n/clinfo-3.0.25.02.14-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgwffrh3n/clinfo-3.0.25.02.14-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |