Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
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): [#def2]
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): [#def3]
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): [#def4]
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): [#def5]
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): [#def6]
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): [#def7]
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): [#def8]
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): [#def9]
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): [#def10]
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): [#def11]
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): [#def12]
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: GCC_ANALYZER_WARNING (CWE-401): [#def13]
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): [#def14]
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: GCC_ANALYZER_WARNING (CWE-401): [#def15]
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): [#def16]
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): [#def17]
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): [#def18]
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): [#def19]
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): [#def20]
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|   	}

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-64.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameclinfo-3.0.23.01.25-8.fc43
diffbase-store-results-to/tmp/tmpmwlq2ot8/clinfo-3.0.23.01.25-8.fc43.tar.xz
diffbase-time-created2026-01-08 15:40:07
diffbase-time-finished2026-01-08 15:41:58
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpmwlq2ot8/clinfo-3.0.23.01.25-8.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpmwlq2ot8/clinfo-3.0.23.01.25-8.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-64.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameclinfo-3.0.25.02.14-1.fc44
store-results-to/tmp/tmpgwffrh3n/clinfo-3.0.25.02.14-1.fc44.tar.xz
time-created2026-01-08 15:42:09
time-finished2026-01-08 15:43:31
titleNewly introduced findings
toolcsmock
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-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9