v4l-utils-1.32.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
v4l-utils-1.32.0/contrib/gconv/iconv/loop.c:486:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bytebuf[1]’
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:390:1: enter_function: entry to ‘gconv’
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:400:6: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:412:7: branch_false: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:412:6: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:512:50: branch_false: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:519:32: branch_true: following ‘true’ branch (when ‘irreversible’ is non-NULL)...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:556:10: branch_true: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:556:10: branch_true: following ‘true’ branch (when ‘consume_incomplete != 0’)...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:559:37: branch_true: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:556:11: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:564:11: branch_true: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:564:11: branch_true: following ‘true’ branch (when ‘outbufstart’ is NULL)...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:567:47: branch_true: ...to here
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:567:14: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/gconv/iconv/skeleton.c:568:22: call_function: inlined call to ‘from_iso6937_single’ from ‘gconv’
#  484|     do
#  485|       {
#  486|->       BODY
#  487|       }
#  488|     while (0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:331:1: warning[-Wanalyzer-malloc-leak]: leak of ‘mc’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1109:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1116:14: call_function: calling ‘mc_open’ from ‘main’
#  329|   
#  330|   	va_end(ap);
#  331|-> }
#  332|   
#  333|   #define logperror(msg) do {\

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:819:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1109:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1116:14: call_function: calling ‘mc_open’ from ‘main’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1116:14: return_function: returning to ‘main’ from ‘mc_open’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1117:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1120:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1120:14: call_function: calling ‘media_get_topology’ from ‘main’
#  817|   		free(media_get_uptr(topo->ptr_links));
#  818|   
#  819|-> 	topo->ptr_entities = 0;
#  820|   	topo->ptr_interfaces = 0;
#  821|   	topo->ptr_pads = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def4]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:833: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mc
#  831|   	mc = calloc(1, sizeof(*mc));
#  832|   
#  833|-> 	mc->fd = open(devname, O_RDWR);
#  834|   	if (mc->fd < 0) {
#  835|   		logperror("Can't open media device");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:833:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mc’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1109:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1116:14: call_function: calling ‘mc_open’ from ‘main’
#  831|   	mc = calloc(1, sizeof(*mc));
#  832|   
#  833|-> 	mc->fd = open(devname, O_RDWR);
#  834|   	if (mc->fd < 0) {
#  835|   		logperror("Can't open media device");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:833:18: warning[-Wanalyzer-malloc-leak]: leak of ‘mc’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1109:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:1116:14: call_function: calling ‘mc_open’ from ‘main’
#  831|   	mc = calloc(1, sizeof(*mc));
#  832|   
#  833|-> 	mc->fd = open(devname, O_RDWR);
#  834|   	if (mc->fd < 0) {
#  835|   		logperror("Can't open media device");

Error: CPPCHECK_WARNING (CWE-476): [#def7]
v4l-utils-1.32.0/contrib/test/mc_nextgen_test.c:834: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mc
#  832|   
#  833|   	mc->fd = open(devname, O_RDWR);
#  834|-> 	if (mc->fd < 0) {
#  835|   		logperror("Can't open media device");
#  836|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:56:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:40:44: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:43:23: branch_true: following ‘true’ branch (when ‘cnt != 5’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:44:42: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:47:20: branch_false: following ‘false’ branch (when ‘size > 0’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:51:20: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:51:20: branch_true: following ‘true’ branch (when ‘cnt == 0’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:51:20: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:43:23: branch_true: following ‘true’ branch (when ‘cnt != 5’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:44:42: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:47:20: branch_false: following ‘false’ branch (when ‘size > 0’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:51:20: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:56:32: danger: ‘buf + (long unsigned int)i * 64’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   54|   			int field, line;
#   55|   
#   56|-> 			line = buf[i].line;
#   57|   			field = buf[i].field;
#   58|   			if (buf[i].id == 0)

Error: COMPILER_WARNING: [#def9]
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c: scope_hint: In function ‘main’
v4l-utils-1.32.0/contrib/test/sliced-vbi-detect.c:101:21: warning[-Wunused-but-set-variable=]: variable ‘set’ set but not used
#  101 |                 int set = 0;
#      |                     ^~~
#   99|   	for (i = 0; i < 16; i++) {
#  100|   		int l;
#  101|-> 		int set = 0;
#  102|   
#  103|   		memset(&vbifmt, 0, sizeof(vbifmt));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:389:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:418:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:430:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:435:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:442:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:448:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:449:15: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:454:20: branch_false: following ‘false’ branch (when ‘size > 0’)...
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:456:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/sliced-vbi-test.c:458:25: call_function: calling ‘process’ from ‘main’
#  387|   static void process(struct v4l2_sliced_vbi_data *s)
#  388|   {
#  389|-> 	if (s->id == 0)
#  390|   		return;
#  391|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fname, "a+")’
v4l-utils-1.32.0/contrib/test/stress-buffer.c:60:12: branch_false: following ‘false’ branch (when ‘argc == 2’)...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:65:19: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:74:19: acquire_resource: opened here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:75:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:15: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:84:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: throw: if ‘open’ throws an exception...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:9: danger: ‘fopen(&fname, "a+")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   78|   	}
#   79|   
#   80|-> 	srand(time(NULL));
#   81|   
#   82|   	while (1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fname, "a+")’
v4l-utils-1.32.0/contrib/test/stress-buffer.c:60:12: branch_false: following ‘false’ branch (when ‘argc == 2’)...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:65:19: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:74:19: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:75:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:15: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:84:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: throw: if ‘open’ throws an exception...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:9: danger: ‘fopen(&fname, "a+")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   78|   	}
#   79|   
#   80|-> 	srand(time(NULL));
#   81|   
#   82|   	while (1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
v4l-utils-1.32.0/contrib/test/stress-buffer.c:98:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 0)’
v4l-utils-1.32.0/contrib/test/stress-buffer.c:60:12: branch_false: following ‘false’ branch (when ‘argc == 2’)...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:65:19: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:75:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:80:15: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:84:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:90:22: acquire_resource: opened here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:91:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/stress-buffer.c:98:37: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/stress-buffer.c:98:37: danger: ‘open(argv[1], 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#   96|   
#   97|   		/* Random number 0 - 1000 */
#   98|-> 		magic_buffer_size = rand() % sizeof(buffer);
#   99|   
#  100|   		memset(buffer, 0, sizeof(buffer));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:54:29: warning[-Wanalyzer-malloc-leak]: leak of ‘buffers’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
#   52|   	do {
#   53|   		if (libv4l)
#   54|-> 			r = v4l2_ioctl(fh, request, arg);
#   55|   		else
#   56|   			r = ioctl(fh, request, arg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:54:29: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:35: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
#   52|   	do {
#   53|   		if (libv4l)
#   54|-> 			r = v4l2_ioctl(fh, request, arg);
#   55|   		else
#   56|   			r = ioctl(fh, request, arg);

Error: CPPCHECK_WARNING (CWE-476): [#def16]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:993: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffers
#  991|   		xioctl(fd, VIDIOC_QUERYBUF, &buf);
#  992|   
#  993|-> 		buffers[n_buffers].length = buf.length;
#  994|   		if (!buffers) {
#  995|   			fprintf(stderr, "Out of memory\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:993:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffers’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
#  991|   		xioctl(fd, VIDIOC_QUERYBUF, &buf);
#  992|   
#  993|-> 		buffers[n_buffers].length = buf.length;
#  994|   		if (!buffers) {
#  995|   			fprintf(stderr, "Out of memory\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1000:52: warning[-Wanalyzer-malloc-leak]: leak of ‘buffers’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
#  998|   
#  999|   		if (libv4l)
# 1000|-> 			buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
# 1001|   					    PROT_READ | PROT_WRITE, MAP_SHARED,
# 1002|   					    fd, buf.m.offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1000:52: warning[-Wanalyzer-malloc-leak]: leak of ‘out_buf’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:35: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
#  998|   
#  999|   		if (libv4l)
# 1000|-> 			buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
# 1001|   					    PROT_READ | PROT_WRITE, MAP_SHARED,
# 1002|   					    fd, buf.m.offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1009:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffers’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1171:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1182:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:21: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1183:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1186:30: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1193:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: call_function: calling ‘querycap’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1199:9: return_function: returning to ‘main’ from ‘querycap’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: call_function: calling ‘xioctl’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1208:9: return_function: returning to ‘main’ from ‘xioctl’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1210:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:41: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:21: call_function: inlined call to ‘is_format_supported’ from ‘main’
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1216:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1217:46: branch_true: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1218:28: branch_false: following ‘false’ branch (when ‘out_buf’ is non-NULL)...
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1235:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/test/v4l2grab.c:1246:23: call_function: calling ‘mmap_capture’ from ‘main’
# 1007|   
# 1008|   		if (MAP_FAILED == buffers[n_buffers].start) {
# 1009|-> 			perror("mmap");
# 1010|   			exit(EXIT_FAILURE);
# 1011|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def21]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
#   79|   static struct firmware* alloc_firmware(void) {
#   80|   	struct firmware *f = malloc(sizeof(*f));
#   81|-> 	f->name = NULL;
#   82|   	f->desc = NULL;
#   83|   	f->nr_desc = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:81:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘f’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1021:35: branch_false: following ‘false’ branch (when ‘action == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1024:33: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1108:1: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#   79|   static struct firmware* alloc_firmware(void) {
#   80|   	struct firmware *f = malloc(sizeof(*f));
#   81|-> 	f->name = NULL;
#   82|   	f->desc = NULL;
#   83|   	f->nr_desc = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def23]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:82: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
#   80|   	struct firmware *f = malloc(sizeof(*f));
#   81|   	f->name = NULL;
#   82|-> 	f->desc = NULL;
#   83|   	f->nr_desc = 0;
#   84|   	return f;

Error: CPPCHECK_WARNING (CWE-476): [#def24]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:83: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
#   81|   	f->name = NULL;
#   82|   	f->desc = NULL;
#   83|-> 	f->nr_desc = 0;
#   84|   	return f;
#   85|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def25]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:92:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.data’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#   90|   		unsigned int i = 0;
#   91|   		for(i = 0; i < f->nr_desc; ++ i) {
#   92|-> 			free(f->desc[i].data);
#   93|   		}
#   94|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:95:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#   93|   		}
#   94|   	}
#   95|-> 	free(f->desc);
#   96|   	free(f);
#   97|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:97:1: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#   95|   	free(f->desc);
#   96|   	free(f);
#   97|-> }
#   98|   
#   99|   static void add_firmware_description(struct firmware *f,

Error: CPPCHECK_WARNING (CWE-476): [#def28]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:104: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_desc
#  102|   
#  103|   	new_desc = malloc((f->nr_desc + 1) * sizeof(*new_desc));
#  104|-> 	memcpy(new_desc, f->desc, f->nr_desc * sizeof(*new_desc));
#  105|   	memcpy(new_desc + f->nr_desc, d, sizeof(*d));
#  106|   	free(f->desc);

Error: CPPCHECK_WARNING (CWE-682): [#def29]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:105: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  103|   	new_desc = malloc((f->nr_desc + 1) * sizeof(*new_desc));
#  104|   	memcpy(new_desc, f->desc, f->nr_desc * sizeof(*new_desc));
#  105|-> 	memcpy(new_desc + f->nr_desc, d, sizeof(*d));
#  106|   	free(f->desc);
#  107|   	f->desc = new_desc;

Error: CPPCHECK_WARNING (CWE-457): [#def30]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:105: warning[uninitvar]: Uninitialized variable: d.int_freq
#  103|   	new_desc = malloc((f->nr_desc + 1) * sizeof(*new_desc));
#  104|   	memcpy(new_desc, f->desc, f->nr_desc * sizeof(*new_desc));
#  105|-> 	memcpy(new_desc + f->nr_desc, d, sizeof(*d));
#  106|   	free(f->desc);
#  107|   	f->desc = new_desc;

Error: CPPCHECK_WARNING (CWE-476): [#def31]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:119: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_desc
#  117|   
#  118|   	new_desc = malloc((f->nr_desc - 1) * sizeof(*new_desc));
#  119|-> 	memcpy(new_desc, f->desc, i * sizeof(*f->desc));
#  120|   	memcpy(new_desc + i, f->desc + i + 1, (f->nr_desc - i - 1) * sizeof(*f->desc));
#  121|   	free(f->desc);

Error: CPPCHECK_WARNING (CWE-682): [#def32]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:120: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  118|   	new_desc = malloc((f->nr_desc - 1) * sizeof(*new_desc));
#  119|   	memcpy(new_desc, f->desc, i * sizeof(*f->desc));
#  120|-> 	memcpy(new_desc + i, f->desc + i + 1, (f->nr_desc - i - 1) * sizeof(*f->desc));
#  121|   	free(f->desc);
#  122|   	f->desc = new_desc;

Error: CPPCHECK_WARNING (CWE-401): [#def33]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:140: error[memleak]: Memory leak: name
#  138|   		printf("Invalid firmware header length.\n");
#  139|   		free_firmware(f);
#  140|-> 		return -1;
#  141|   	}
#  142|   	name[32] = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def34]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:142: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: name
#  140|   		return -1;
#  141|   	}
#  142|-> 	name[32] = 0;
#  143|   	memcpy(name, data, 32);
#  144|   	f->name = name;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:142:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘name’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1021:35: branch_false: following ‘false’ branch (when ‘action == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1024:33: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1108:1: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  140|   		return -1;
#  141|   	}
#  142|-> 	name[32] = 0;
#  143|   	memcpy(name, data, 32);
#  144|   	f->name = name;

Error: CPPCHECK_WARNING (CWE-476): [#def36]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:143: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: name
#  141|   	}
#  142|   	name[32] = 0;
#  143|-> 	memcpy(name, data, 32);
#  144|   	f->name = name;
#  145|   	p += 32;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def37]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:143:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1021:35: branch_false: following ‘false’ branch (when ‘action == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1024:33: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1108:1: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  141|   	}
#  142|   	name[32] = 0;
#  143|-> 	memcpy(name, data, 32);
#  144|   	f->name = name;
#  145|   	p += 32;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:158:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*<unknown>.desc + (long unsigned int)i * 32’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  156|   			return -1;
#  157|   		}
#  158|-> 		f->desc[i].type = __le32_to_cpu(*(__u32*) p);
#  159|   		p += sizeof(f->desc[i].type);
#  160|   		f->desc[i].id = __le64_to_cpu(*(__u64*) p);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def39]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:179:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((sizetype)*(__u32 *)p)’ where non-null expected
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  177|   
#  178|   		f->desc[i].data = malloc(f->desc[i].size);
#  179|-> 		memcpy(f->desc[i].data, p, f->desc[i].size);
#  180|   
#  181|   		p += f->desc[i].size;

Error: CPPCHECK_WARNING (CWE-476): [#def40]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:202: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  200|   	p = data;
#  201|   
#  202|-> 	memcpy(p, f->name, 32);
#  203|   	p += 32;
#  204|   

Error: CPPCHECK_WARNING (CWE-682): [#def41]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:203: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  201|   
#  202|   	memcpy(p, f->name, 32);
#  203|-> 	p += 32;
#  204|   
#  205|   	*(__u16*)p = __cpu_to_le16(f->version);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:247:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1021:35: branch_false: following ‘false’ branch (when ‘action == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1024:33: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1108:1: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  245|   
#  246|   	/* allocate firmware buffer*/
#  247|-> 	ptr = malloc(buf.st_size);
#  248|   
#  249|   	if(read(fd, ptr, buf.st_size) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:250:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1021:35: branch_false: following ‘false’ branch (when ‘action == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1024:33: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1108:1: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  248|   
#  249|   	if(read(fd, ptr, buf.st_size) < 0) {
#  250|-> 		perror("Error while reading the firmware file");
#  251|   		free(ptr);
#  252|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:263:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  261|   	}
#  262|   
#  263|-> 	close(fd);
#  264|   	free(ptr);
#  265|   	return f;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:263:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  261|   	}
#  262|   
#  263|-> 	close(fd);
#  264|   	free(ptr);
#  265|   	return f;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:263:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:970:5: enter_function: entry to ‘main’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:996:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1000:17: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1061:11: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1067:11: branch_false: following ‘false’ branch (when ‘action != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1073:29: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:1077:13: call_function: calling ‘read_firmware_file’ from ‘main’
#  261|   	}
#  262|   
#  263|-> 	close(fd);
#  264|   	free(ptr);
#  265|   	return f;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:632:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fpos’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:833:13: enter_function: entry to ‘seek_firmware’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:852:16: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:879:25: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:881:25: call_function: calling ‘seek_chunks’ from ‘seek_firmware’
#  630|   		fpos = p;
#  631|   		for (p2 = fdata; p2 < endf; p2++, fpos++) {
#  632|-> 			if (*fpos != *p2)
#  633|   				break;
#  634|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def48]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:648: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp_data
#  646|   	fsize = endf - fdata;
#  647|   	temp_data = malloc(fsize);
#  648|-> 	memcpy(temp_data, fdata, fsize);
#  649|   
#  650|   	/* Try again, changing endian */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def49]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:648:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘temp_data’ where non-null expected
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:833:13: enter_function: entry to ‘seek_firmware’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_false: following ‘false’ branch (when ‘i == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:863:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:879:25: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:881:25: call_function: calling ‘seek_chunks’ from ‘seek_firmware’
#  646|   	fsize = endf - fdata;
#  647|   	temp_data = malloc(fsize);
#  648|-> 	memcpy(temp_data, fdata, fsize);
#  649|   
#  650|   	/* Try again, changing endian */

Error: CPPCHECK_WARNING (CWE-682): [#def50]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:651: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  649|   
#  650|   	/* Try again, changing endian */
#  651|-> 	for (p2 = temp_data; p2 < temp_data + fsize;) {
#  652|   		unsigned char c;
#  653|   		int size = *p2 + (*(p2 + 1) << 8);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:666:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fpos’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:833:13: enter_function: entry to ‘seek_firmware’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:852:16: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:879:25: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:881:25: call_function: calling ‘seek_chunks’ from ‘seek_firmware’
#  664|   		fpos = p;
#  665|   		for (p2 = temp_data; p2 < temp_data + fsize; p2++, fpos++) {
#  666|-> 			if (*fpos != *p2)
#  667|   				break;
#  668|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:831:1: warning[-Wanalyzer-malloc-leak]: leak of ‘p2’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:833:13: enter_function: entry to ‘seek_firmware’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:879:25: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:881:25: call_function: calling ‘seek_chunks’ from ‘seek_firmware’
#  829|   	goto seek_next;
#  830|   #endif
#  831|-> }
#  832|   
#  833|   static void seek_firmware(struct firmware *f, char *seek_file, char *write_file) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_resource: opened here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: throw: if ‘fseek’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: danger: ‘fopen(seek_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  847|   		exit(-1);
#  848|   	}
#  849|-> 	fseek(fp, 0L, SEEK_END);
#  850|   	size = ftell(fp);
#  851|   	rewind(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: throw: if ‘fseek’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: danger: ‘fopen(seek_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  847|   		exit(-1);
#  848|   	}
#  849|-> 	fseek(fp, 0L, SEEK_END);
#  850|   	size = ftell(fp);
#  851|   	rewind(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_resource: opened here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: throw: if ‘ftell’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: danger: ‘fopen(seek_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  848|   	}
#  849|   	fseek(fp, 0L, SEEK_END);
#  850|-> 	size = ftell(fp);
#  851|   	rewind(fp);
#  852|   	seek = malloc(size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: throw: if ‘ftell’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:850:16: danger: ‘fopen(seek_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  848|   	}
#  849|   	fseek(fp, 0L, SEEK_END);
#  850|-> 	size = ftell(fp);
#  851|   	rewind(fp);
#  852|   	seek = malloc(size);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_resource: opened here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: throw: if ‘rewind’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: danger: ‘fopen(seek_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
#  849|   	fseek(fp, 0L, SEEK_END);
#  850|   	size = ftell(fp);
#  851|-> 	rewind(fp);
#  852|   	seek = malloc(size);
#  853|   	p = seek;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(seek_file, "r")’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:844:12: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: throw: if ‘rewind’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:851:9: danger: ‘fopen(seek_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  849|   	fseek(fp, 0L, SEEK_END);
#  850|   	size = ftell(fp);
#  851|-> 	rewind(fp);
#  852|   	seek = malloc(size);
#  853|   	p = seek;

Error: CPPCHECK_WARNING (CWE-476): [#def59]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:856: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  854|   
#  855|   	do {
#  856|-> 		i = fread(p, 1, 16768, fp);
#  857|   		if (i > 0) {
#  858|   			rd += i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:852:16: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_false: following ‘false’ branch (when ‘i == 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:863:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:895:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:897:12: branch_false: following ‘false’ branch (when ‘write_file’ is non-NULL)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:900:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:901:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: danger: ‘p’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  900|   	fp = fopen(write_file, "w");
#  901|   	if (!fp) {
#  902|-> 		perror("Writing firmware file");
#  903|   		exit(-1);
#  904|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: warning[-Wanalyzer-malloc-leak]: leak of ‘seek’
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:845:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:849:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:852:16: acquire_memory: allocated here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:857:20: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: following ‘true’ branch (when ‘i != 0’)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:861:18: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:865:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:872:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:876:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:895:9: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:897:12: branch_false: following ‘false’ branch (when ‘write_file’ is non-NULL)...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:900:14: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:901:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/firmware-tool.c:902:17: danger: ‘seek’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  900|   	fp = fopen(write_file, "w");
#  901|   	if (!fp) {
#  902|-> 		perror("Writing firmware file");
#  903|   		exit(-1);
#  904|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def62]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v
#   38|   static struct vector* alloc_vector(unsigned int size) {
#   39|   	struct vector *v = malloc(sizeof(*v));
#   40|-> 	v->data = malloc(size);
#   41|   	v->size = size;
#   42|   	return v;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:40:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘v’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:39:28: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:40:9: danger: ‘v’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   38|   static struct vector* alloc_vector(unsigned int size) {
#   39|   	struct vector *v = malloc(sizeof(*v));
#   40|-> 	v->data = malloc(size);
#   41|   	v->size = size;
#   42|   	return v;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:40:19: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_vector(1)’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:87:6: enter_function: entry to ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: call_function: calling ‘alloc_vector’ from ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: return_function: returning to ‘create_standard_data’ from ‘alloc_vector’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:40:19: danger: ‘alloc_vector(1)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#   38|   static struct vector* alloc_vector(unsigned int size) {
#   39|   	struct vector *v = malloc(sizeof(*v));
#   40|-> 	v->data = malloc(size);
#   41|   	v->size = size;
#   42|   	return v;

Error: CPPCHECK_WARNING (CWE-476): [#def65]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v
#   39|   	struct vector *v = malloc(sizeof(*v));
#   40|   	v->data = malloc(size);
#   41|-> 	v->size = size;
#   42|   	return v;
#   43|   }

Error: CPPCHECK_WARNING (CWE-476): [#def66]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:56: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n_data
#   54|   	v->size = MAX(v->size, new_size);
#   55|   	n_data = malloc(v->size);
#   56|-> 	memcpy(n_data, v->data, old_size);
#   57|   	free(v->data);
#   58|   	v->data = n_data;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def67]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:56:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*v.data’ where non-null expected
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:87:6: enter_function: entry to ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: call_function: calling ‘alloc_vector’ from ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: return_function: returning to ‘create_standard_data’ from ‘alloc_vector’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:100:16: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:141:9: call_function: inlined call to ‘write_vector16’ from ‘create_standard_data’
#   54|   	v->size = MAX(v->size, new_size);
#   55|   	n_data = malloc(v->size);
#   56|-> 	memcpy(n_data, v->data, old_size);
#   57|   	free(v->data);
#   58|   	v->data = n_data;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def68]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:56:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘n_data’ where non-null expected
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:55:18: acquire_memory: this call could return NULL
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:56:9: danger: argument 1 (‘n_data’) from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#   54|   	v->size = MAX(v->size, new_size);
#   55|   	n_data = malloc(v->size);
#   56|-> 	memcpy(n_data, v->data, old_size);
#   57|   	free(v->data);
#   58|   	v->data = n_data;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def69]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:56:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*v.data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:87:6: enter_function: entry to ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: call_function: calling ‘alloc_vector’ from ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: return_function: returning to ‘create_standard_data’ from ‘alloc_vector’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_false: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:100:16: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:141:9: call_function: inlined call to ‘write_vector16’ from ‘create_standard_data’
#   54|   	v->size = MAX(v->size, new_size);
#   55|   	n_data = malloc(v->size);
#   56|-> 	memcpy(n_data, v->data, old_size);
#   57|   	free(v->data);
#   58|   	v->data = n_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:87:6: enter_function: entry to ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: call_function: calling ‘alloc_vector’ from ‘create_standard_data’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:92:28: return_function: returning to ‘create_standard_data’ from ‘alloc_vector’
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:95:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: branch_true: ...to here
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/contrib/xc3028-firmware/standards.c:96:17: danger: ‘<unknown>’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#   94|   
#   95|   	if (!(file = fopen(filename, "r"))) {
#   96|-> 		perror("Cannot open the firmware standard file.\n");
#   97|   		*data = NULL;
#   98|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def71]
v4l-utils-1.32.0/lib/libdvbv5/countries.c:406: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  404|   
#  405|   		// country after '_', if given
#  406|-> 		if ((pch = strchr(buf, '_')))
#  407|   			pbuf = pch + 1;
#  408|   

Error: CPPCHECK_WARNING (CWE-476): [#def72]
v4l-utils-1.32.0/lib/libdvbv5/countries.c:410: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbuf
#  408|   
#  409|   		// remove all after '@', including '@'
#  410|-> 		if ((pch = strchr(pbuf, '@')))
#  411|   			*pch = 0;
#  412|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def73]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_ca_identifier.c:34:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#   32|   
#   33|   	d->caid_count = d->length >> 1; /* FIXME: warn if odd */
#   34|-> 	d->caids = malloc(d->length);
#   35|   	if (!d->caids) {
#   36|   		dvb_logerr("dvb_desc_ca_identifier_init: out of memory");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def74]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_extension.c:163:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘calloc(1, size)’ where non-null expected
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_extension.c:156:27: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_extension.c:158:12: branch_false: following ‘false’ branch (when ‘init’ is NULL)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_extension.c:163:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_extension.c:163:17: danger: argument 1 (‘calloc(1, size)’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  161|   	}
#  162|   	else
#  163|-> 		memcpy(ext->descriptor, p, size);
#  164|   	return 0;
#  165|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def75]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_frequency_list.c:45:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)*(struct dvb_desc_frequency_list *)desc.length + 18446744073709551615 >> 2 & 255, 4)’
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_frequency_list.c:41:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_frequency_list.c:43:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_frequency_list.c:44:51: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_frequency_list.c:45:17: danger: ‘calloc((long unsigned int)*(struct dvb_desc_frequency_list *)desc.length + 18446744073709551615 >> 2 & 255, 4) + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   43|   	for (i = 0; i < d->frequencies; i++) {
#   44|   		d->frequency[i] = ((uint32_t *) p)[i];
#   45|-> 		bswap32(d->frequency[i]);
#   46|   		switch (d->freq_type) {
#   47|   			case 1: /* satellite - to get kHz */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:42:12: branch_false: following ‘false’ branch (when ‘desc_len > 2’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: following ‘false’ branch (when ‘desc_len > 4’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:57:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:69:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:74:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:78:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:79:58: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:88:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:93:77: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:98:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:104:54: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:109:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:110:55: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:113:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:138:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:17: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   66|   		}
#   67|   
#   68|-> 		d->cell = realloc(d->cell, (d->num_cell + 1) * sizeof(*d->cell));
#   69|   		if (!d->cell) {
#   70|   			dvb_logerr("%s: out of memory", __func__);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:27: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:42:12: branch_false: following ‘false’ branch (when ‘desc_len > 2’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: following ‘false’ branch (when ‘desc_len > 4’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:57:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:69:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:74:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:78:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:79:58: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:88:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:93:77: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:98:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:104:54: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:109:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:110:55: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:110:55: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:113:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:138:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:27: danger: ‘<unknown>’ leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
#   66|   		}
#   67|   
#   68|-> 		d->cell = realloc(d->cell, (d->num_cell + 1) * sizeof(*d->cell));
#   69|   		if (!d->cell) {
#   70|   			dvb_logerr("%s: out of memory", __func__);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:124:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:42:12: branch_false: following ‘false’ branch (when ‘desc_len > 2’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: following ‘false’ branch (when ‘desc_len > 4’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:57:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:69:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:74:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:78:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:79:58: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:88:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:93:77: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:98:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:104:54: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:105:17: release_memory: using NULL here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:109:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:120:40: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:120:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:124:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:124:25: danger: dereference of NULL ‘*<unknown>.subcel + (long unsigned int)i * 5’
#  122|   				return -2;
#  123|   			}
#  124|-> 			d->cell[d->num_cell].subcel[i].cell_id_extension = *p;
#  125|   			p++;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:131:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:42:12: branch_false: following ‘false’ branch (when ‘desc_len > 2’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:46:12: branch_false: following ‘false’ branch (when ‘desc_len > 4’)...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:57:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:62:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:32: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:63:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:68:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:69:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:74:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:78:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:79:58: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:88:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:93:77: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:98:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:104:54: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:109:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:110:55: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:113:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:119:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:120:40: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:120:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:124:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/descriptors/desc_t2_delivery.c:131:25: danger: dereference of NULL ‘realloc(*(struct dvb_desc_t2_delivery *)desc.centre_frequency, (long unsigned int)(*(struct dvb_desc_t2_delivery *)desc.frequency_loop_length + 1) * 4) + (long unsigned int)pos * 4’
#  129|   			d->centre_frequency = realloc(d->centre_frequency,
#  130|   						      d->frequency_loop_length * sizeof(*d->centre_frequency));
#  131|-> 			memcpy(&d->centre_frequency[pos], p, sizeof(*d->centre_frequency));
#  132|   			bswap32(d->centre_frequency[pos]);
#  133|   			d->cell[d->num_cell].subcel[i].transposer_frequency = d->centre_frequency[pos];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:82:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*<unknown>.path, 2050)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:76:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:81:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:81:20: acquire_resource: opened here
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:82:9: throw: if ‘dvb_dev_free’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-demux.c:82:9: danger: ‘open(*<unknown>.path, 2050)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   80|   
#   81|   	fd_demux = open(dvb_dev->path, O_RDWR | O_NONBLOCK);
#   82|-> 	dvb_dev_free(dvb);
#   83|   	return fd_demux;
#   84|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:121:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(udev_device_get_sysname(dev))’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:86:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:89:27: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:90:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:90:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:119:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:120:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:120:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:121:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:121:33: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:121:33: danger: ‘strdup(udev_device_get_sysname(dev))’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  119|   		if (!strcmp(action,"remove")) {
#  120|   			if (priv->notify_dev_change)
#  121|-> 				priv->notify_dev_change(strdup(sysname),
#  122|   							DVB_DEV_REMOVE, priv->user_priv);
#  123|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: throw: if ‘udev_device_get_devnode’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  138|   		return -ENODEV;
#  139|   
#  140|-> 	p = udev_device_get_devnode(dev);
#  141|   	if (!p || !*p) {
#  142|   		dvb_logwarn(_("Can't get device node filename"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:142:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:142:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:142:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:142:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:142:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  140|   	p = udev_device_get_devnode(dev);
#  141|   	if (!p || !*p) {
#  142|-> 		dvb_logwarn(_("Can't get device node filename"));
#  143|   		goto err_syspath;
#  144|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: throw: if ‘udev_device_get_property_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  147|   		goto err_syspath;
#  148|   
#  149|-> 	p = udev_device_get_property_value(dev, "DVB_DEVICE_TYPE");
#  150|   	if (!p)
#  151|   		goto err_path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: throw: if ‘udev_device_get_property_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  147|   		goto err_syspath;
#  148|   
#  149|-> 	p = udev_device_get_property_value(dev, "DVB_DEVICE_TYPE");
#  150|   	if (!p)
#  151|   		goto err_path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  157|   	}
#  158|   	if (i == dev_type_names_size) {
#  159|-> 		dvb_logwarn(_("Ignoring device %s"), dev_list.path);
#  160|   		goto err_path;
#  161|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:159:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  157|   	}
#  158|   	if (i == dev_type_names_size) {
#  159|-> 		dvb_logwarn(_("Ignoring device %s"), dev_list.path);
#  160|   		goto err_path;
#  161|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: throw: if ‘udev_device_get_sysname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  161|   	}
#  162|   
#  163|-> 	p = udev_device_get_sysname(dev);
#  164|   	if (!p) {
#  165|   		dvb_logwarn(_("Can't get sysname for device %s"), dev_list.path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: throw: if ‘udev_device_get_sysname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  161|   	}
#  162|   
#  163|-> 	p = udev_device_get_sysname(dev);
#  164|   	if (!p) {
#  165|   		dvb_logwarn(_("Can't get sysname for device %s"), dev_list.path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  163|   	p = udev_device_get_sysname(dev);
#  164|   	if (!p) {
#  165|-> 		dvb_logwarn(_("Can't get sysname for device %s"), dev_list.path);
#  166|   		goto err_path;
#  167|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:165:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  163|   	p = udev_device_get_sysname(dev);
#  164|   	if (!p) {
#  165|-> 		dvb_logwarn(_("Can't get sysname for device %s"), dev_list.path);
#  166|   		goto err_path;
#  167|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: throw: if ‘udev_device_get_parent’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
#  170|   		goto err_path;
#  171|   
#  172|-> 	parent = udev_device_get_parent(dev);
#  173|   	if (!parent)
#  174|   		goto added;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: throw: if ‘udev_device_get_parent’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/14)
#  170|   		goto err_path;
#  171|   
#  172|-> 	parent = udev_device_get_parent(dev);
#  173|   	if (!parent)
#  174|   		goto added;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: throw: if ‘udev_device_get_parent’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  170|   		goto err_path;
#  171|   
#  172|-> 	parent = udev_device_get_parent(dev);
#  173|   	if (!parent)
#  174|   		goto added;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: throw: if ‘udev_device_get_subsystem’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
#  174|   		goto added;
#  175|   
#  176|-> 	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|   		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: throw: if ‘udev_device_get_subsystem’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/14)
#  174|   		goto added;
#  175|   
#  176|-> 	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|   		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: throw: if ‘udev_device_get_subsystem’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  174|   		goto added;
#  175|   
#  176|-> 	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|   		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6)
#  176|   	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|-> 		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);
#  179|   		goto added;
#  180|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/14)
#  176|   	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|-> 		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);
#  179|   		goto added;
#  180|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:178:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  176|   	bus_type = udev_device_get_subsystem(parent);
#  177|   	if (!bus_type) {
#  178|-> 		dvb_logwarn(_("Can't get bus type for device %s"), dev_list.path);
#  179|   		goto added;
#  180|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: throw: if ‘udev_device_get_sysname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/6)
#  180|   	}
#  181|   
#  182|-> 	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|   		dvb_logerr(_("error %d when storing bus address"), errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: throw: if ‘udev_device_get_sysname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/14)
#  180|   	}
#  181|   
#  182|-> 	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|   		dvb_logerr(_("error %d when storing bus address"), errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: throw: if ‘udev_device_get_sysname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  180|   	}
#  181|   
#  182|-> 	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|   		dvb_logerr(_("error %d when storing bus address"), errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/6)
#  182|   	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|-> 		dvb_logerr(_("error %d when storing bus address"), errno);
#  185|   		goto err_sysname;
#  186|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/14)
#  182|   	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|-> 		dvb_logerr(_("error %d when storing bus address"), errno);
#  185|   		goto err_sysname;
#  186|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:184:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
#  182|   	ret = asprintf(&buf, "%s:%s", bus_type, udev_device_get_sysname(parent));
#  183|   	if (ret < 0) {
#  184|-> 		dvb_logerr(_("error %d when storing bus address"), errno);
#  185|   		goto err_sysname;
#  186|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_true: following ‘true’ branch (when ‘dvb_dev’ is NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/6)
#  199|   	dvb_dev = realloc(dvb->d.devices, sizeof(*dvb->d.devices) * dvb->d.num_devices);
#  200|   	if (!dvb_dev) {
#  201|-> 		dvb_logerr(_("Not enough memory to store the list of DVB devices"));
#  202|   		goto err_sysname;
#  203|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_true: following ‘true’ branch (when ‘dvb_dev’ is NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/14)
#  199|   	dvb_dev = realloc(dvb->d.devices, sizeof(*dvb->d.devices) * dvb->d.num_devices);
#  200|   	if (!dvb_dev) {
#  201|-> 		dvb_logerr(_("Not enough memory to store the list of DVB devices"));
#  202|   		goto err_sysname;
#  203|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_true: following ‘true’ branch (when ‘dvb_dev’ is NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:201:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  199|   	dvb_dev = realloc(dvb->d.devices, sizeof(*dvb->d.devices) * dvb->d.num_devices);
#  200|   	if (!dvb_dev) {
#  201|-> 		dvb_logerr(_("Not enough memory to store the list of DVB devices"));
#  202|   		goto err_sysname;
#  203|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/6)
#  212|   		char *p;
#  213|   
#  214|-> 		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|   		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/14)
#  212|   		char *p;
#  213|   
#  214|-> 		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|   		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  212|   		char *p;
#  213|   
#  214|-> 		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|   		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/6)
#  213|   
#  214|   		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|-> 		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   
#  217|   		if (!pci_dev || !pci_vend)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/14)
#  213|   
#  214|   		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|-> 		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   
#  217|   		if (!pci_dev || !pci_vend)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:214:27: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:215:28: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
#  213|   
#  214|   		pci_dev = udev_device_get_sysattr_value(parent, "subsystem_device");
#  215|-> 		pci_vend = udev_device_get_sysattr_value(parent, "subsystem_vendor");
#  216|   
#  217|   		if (!pci_dev || !pci_vend)

Error: COMPILER_WARNING (CWE-704): [#def116]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c: scope_hint: In function ‘handle_device_change’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:220:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  220 |                 p = strstr(pci_dev, "0x");
#      |                   ^
#  218|   			goto added;
#  219|   
#  220|-> 		p = strstr(pci_dev, "0x");
#  221|   		if (p)
#  222|   			pci_dev = p + 2;

Error: COMPILER_WARNING (CWE-704): [#def117]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:220:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  218|   			goto added;
#  219|   
#  220|-> 		p = strstr(pci_dev, "0x");
#  221|   		if (p)
#  222|   			pci_dev = p + 2;

Error: COMPILER_WARNING (CWE-704): [#def118]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:224:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  224 |                 p = strstr(pci_vend, "0x");
#      |                   ^
#  222|   			pci_dev = p + 2;
#  223|   
#  224|-> 		p = strstr(pci_vend, "0x");
#  225|   		if (p)
#  226|   			pci_vend = p + 2;

Error: COMPILER_WARNING (CWE-704): [#def119]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:224:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  222|   			pci_dev = p + 2;
#  223|   
#  224|-> 		p = strstr(pci_vend, "0x");
#  225|   		if (p)
#  226|   			pci_vend = p + 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/6)
#  230|   		const char *vend, *prod;
#  231|   
#  232|-> 		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|   		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/14)
#  230|   		const char *vend, *prod;
#  231|   
#  232|-> 		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|   		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:232:24: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
#  230|   		const char *vend, *prod;
#  231|   
#  232|-> 		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|   		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/6)
#  231|   
#  232|   		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|-> 		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   
#  235|   		if (vend && prod)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/14)
#  231|   
#  232|   		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|-> 		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   
#  235|   		if (vend && prod)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:233:24: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
#  231|   
#  232|   		vend = udev_device_get_sysattr_value(parent, "idVendor");
#  233|-> 		prod = udev_device_get_sysattr_value(parent, "idProduct");
#  234|   
#  235|   		if (vend && prod)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:235:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/6)
#  236|   			ret = asprintf(&dvb_dev->bus_id, "%s:%s", vend, prod);
#  237|   
#  238|-> 		p = udev_device_get_sysattr_value(parent,"manufacturer");
#  239|   		if (p)
#  240|   			dvb_dev->manufacturer = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:235:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/14)
#  236|   			ret = asprintf(&dvb_dev->bus_id, "%s:%s", vend, prod);
#  237|   
#  238|-> 		p = udev_device_get_sysattr_value(parent,"manufacturer");
#  239|   		if (p)
#  240|   			dvb_dev->manufacturer = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:235:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:238:21: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/2)
#  236|   			ret = asprintf(&dvb_dev->bus_id, "%s:%s", vend, prod);
#  237|   
#  238|-> 		p = udev_device_get_sysattr_value(parent,"manufacturer");
#  239|   		if (p)
#  240|   			dvb_dev->manufacturer = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:239:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/6)
#  240|   			dvb_dev->manufacturer = strdup(p);
#  241|   
#  242|-> 		p = udev_device_get_sysattr_value(parent,"product");
#  243|   		if (p)
#  244|   			dvb_dev->product = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:239:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/14)
#  240|   			dvb_dev->manufacturer = strdup(p);
#  241|   
#  242|-> 		p = udev_device_get_sysattr_value(parent,"product");
#  243|   		if (p)
#  244|   			dvb_dev->product = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:176:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:177:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:182:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:183:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:188:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:200:12: branch_false: following ‘false’ branch (when ‘dvb_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:205:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:210:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:229:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:239:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: throw: if ‘udev_device_get_sysattr_value’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:242:21: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
#  240|   			dvb_dev->manufacturer = strdup(p);
#  241|   
#  242|-> 		p = udev_device_get_sysattr_value(parent,"product");
#  243|   		if (p)
#  244|   			dvb_dev->product = strdup(p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:251:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/6)
#  250|   added:
#  251|   	if (priv->notify_dev_change)
#  252|-> 		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|   	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:251:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/14)
#  250|   added:
#  251|   	if (priv->notify_dev_change)
#  252|-> 		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|   	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:251:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/2)
#  250|   added:
#  251|   	if (priv->notify_dev_change)
#  252|-> 		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|   	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*dvb_dev.sysname)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:251:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:252:17: danger: ‘strdup(*dvb_dev.sysname)’ leaks here; was allocated at [(21)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/20)
#  250|   added:
#  251|   	if (priv->notify_dev_change)
#  252|-> 		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|   	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.path’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:145:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: throw: if ‘dvb_dev_dump_device’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: danger: ‘dev_list.path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/6)
#  251|   	if (priv->notify_dev_change)
#  252|   		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|-> 	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   
#  255|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.sysname’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: throw: if ‘dvb_dev_dump_device’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: danger: ‘dev_list.sysname’ leaks here; was allocated at [(15)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/14)
#  251|   	if (priv->notify_dev_change)
#  252|   		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|-> 	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   
#  255|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_list.syspath’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:129:12: branch_false: following ‘false’ branch (when ‘syspath’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:136:28: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:137:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:140:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:141:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:146:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:149:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:150:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:158:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:163:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:164:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:168:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:169:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:172:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:173:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:174:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: throw: if ‘dvb_dev_dump_device’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:253:9: danger: ‘dev_list.syspath’ leaks here; was allocated at [(3)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/2)
#  251|   	if (priv->notify_dev_change)
#  252|   		priv->notify_dev_change(strdup(dvb_dev->sysname), type, priv->user_priv);
#  253|-> 	dvb_dev_dump_device(_("Found dvb %s device: %s"), parms, dvb_dev);
#  254|   
#  255|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: warning[-Wanalyzer-malloc-leak]: leak of ‘open_dev’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:442:2: enter_function: entry to ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: call_function: calling ‘dvb_local_get_dev_info’ from ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: return_function: returning to ‘dvb_local_open’ from ‘dvb_local_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:451:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:455:12: branch_false: following ‘false’ branch (when ‘open_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:470:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:470:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:471:25: danger: ‘open_dev’ leaks here; was allocated at [(11)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/10)
#  469|   		 */
#  470|   		if (!strcmp(dev->bus_addr, "platform:dvbloopback")) {
#  471|-> 			dvb_logwarn(_("Detected dvbloopback"));
#  472|   			flags |= O_NONBLOCK;
#  473|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: warning[-Wanalyzer-malloc-leak]: leak of ‘open_dev’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:442:2: enter_function: entry to ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: call_function: calling ‘dvb_local_get_dev_info’ from ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: return_function: returning to ‘dvb_local_open’ from ‘dvb_local_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:451:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:455:12: branch_false: following ‘false’ branch (when ‘open_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:470:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: throw: if ‘dvb_fe_open_fname’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: danger: ‘open_dev’ leaks here; was allocated at [(11)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/10)
#  475|   		}
#  476|   
#  477|-> 		ret = dvb_fe_open_fname(parms, strdup(dev->path), flags);
#  478|   		if (ret) {
#  479|   			free(open_dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*<unknown>.path)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:442:2: enter_function: entry to ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: call_function: calling ‘dvb_local_get_dev_info’ from ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: return_function: returning to ‘dvb_local_open’ from ‘dvb_local_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:451:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:455:12: branch_false: following ‘false’ branch (when ‘open_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:470:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:477:23: danger: ‘strdup(*<unknown>.path)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/14)
#  475|   		}
#  476|   
#  477|-> 		ret = dvb_fe_open_fname(parms, strdup(dev->path), flags);
#  478|   		if (ret) {
#  479|   			free(open_dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:485:23: warning[-Wanalyzer-malloc-leak]: leak of ‘open_dev’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:442:2: enter_function: entry to ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: call_function: calling ‘dvb_local_get_dev_info’ from ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: return_function: returning to ‘dvb_local_open’ from ‘dvb_local_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:451:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:455:12: branch_false: following ‘false’ branch (when ‘open_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:485:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:485:23: throw: if ‘open’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:485:23: danger: ‘open_dev’ leaks here; was allocated at [(11)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/10)
#  483|   	} else {
#  484|   		/* We don't need special handling for other DVB device types */
#  485|-> 		ret = open(dev->path, flags);
#  486|   		if (ret == -1) {
#  487|   			dvb_logerr(_("Can't open %s with flags %d: %d %m"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: warning[-Wanalyzer-malloc-leak]: leak of ‘open_dev’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:442:2: enter_function: entry to ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: call_function: calling ‘dvb_local_get_dev_info’ from ‘dvb_local_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:450:15: return_function: returning to ‘dvb_local_open’ from ‘dvb_local_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:451:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:454:20: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:455:12: branch_false: following ‘false’ branch (when ‘open_dev’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:460:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:485:28: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:486:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-local.c:487:25: danger: ‘open_dev’ leaks here; was allocated at [(11)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/10)
#  485|   		ret = open(dev->path, flags);
#  486|   		if (ret == -1) {
#  487|-> 			dvb_logerr(_("Can't open %s with flags %d: %d %m"),
#  488|   				   dev->path, flags, errno);
#  489|   			free(open_dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ringbuf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1036:36: enter_function: entry to ‘dvb_remote_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1047:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1051:12: branch_false: following ‘false’ branch (when ‘ringbuf’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1055:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1057:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_open’
#  129|   	char **strings = NULL;
#  130|   
#  131|-> 	nptrs = backtrace(buffer, sizeof(buffer));
#  132|   
#  133|   	if (nptrs) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:135:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ringbuf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1036:36: enter_function: entry to ‘dvb_remote_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1047:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1051:12: branch_false: following ‘false’ branch (when ‘ringbuf’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1055:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1057:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_open’
#  133|   	if (nptrs) {
#  134|   		strings = backtrace_symbols(buffer, nptrs);
#  135|-> 		dvb_logdbg("Stack:");
#  136|   	}
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ringbuf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1036:36: enter_function: entry to ‘dvb_remote_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1047:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1051:12: branch_false: following ‘false’ branch (when ‘ringbuf’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1055:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1057:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_open’
#  137|   
#  138|   	for (i = 0; i < nptrs; i++)
#  139|-> 		dvb_logdbg("   %s", strings[i]);
#  140|   
#  141|   	free(strings);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def147]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:166:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:968:22: enter_function: entry to ‘dvb_remote_get_dev_info’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:977:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:980:15: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:980:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_get_dev_info’
#  164|   			len = strlen(s);
#  165|   			if (p + len + 4 > endp) {
#  166|-> 				dvb_logdbg("buffer too short for string: pos: %zd, len:%d, buffer size:%zd",
#  167|   					   p - buf, len, sizeof(buf));
#  168|   				return -1;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def148]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:178:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1489:5: enter_function: entry to ‘dvb_remote_fe_set_parms’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1500:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1503:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1506:15: call_function: calling ‘prepare_data’ from ‘dvb_remote_fe_set_parms’
#  176|   		case 'i':              /* 32-bit int */
#  177|   			if (p + 4 > endp) {
#  178|-> 				dvb_logdbg("buffer to short for int32_t");
#  179|   				return -1;
#  180|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:244:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ringbuf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1036:36: enter_function: entry to ‘dvb_remote_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1047:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1051:12: branch_false: following ‘false’ branch (when ‘ringbuf’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1055:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1057:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_open’
#  242|   	msg = calloc(1, sizeof(*msg));
#  243|   	if (!msg) {
#  244|-> 		dvb_logerr("calloc queued_msg");
#  245|   		stack_dump(parms);
#  246|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ringbuf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1036:36: enter_function: entry to ‘dvb_remote_open’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1047:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1050:19: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1051:12: branch_false: following ‘false’ branch (when ‘ringbuf’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1055:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:1057:15: call_function: calling ‘send_fmt’ from ‘dvb_remote_open’
#  269|   	len = strlen(cmd);
#  270|   	if (p + len + 4 > endp) {
#  271|-> 		dvb_logdbg("buffer too short for command: pos: %zd, len:%d, buffer size:%zd",
#  272|   				p - buf, len, sizeof(buf));
#  273|   		stack_dump(parms);

Error: CPPCHECK_WARNING (CWE-664): [#def151]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev-remote.c:466: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  464|   					   p - buf, 4, buf_size);
#  465|   				stack_dump(parms);
#  466|-> 				return -1;
#  467|   			}
#  468|   			len = be32toh(*(int32_t *)p);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:69:15: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:70:12: branch_false: following ‘false’ branch (when ‘dvb’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: throw: if ‘dvb_fe_dummy’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: danger: ‘dvb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   71|   		return NULL;
#   72|   
#   73|-> 	dvb->d.fe_parms = dvb_fe_dummy();
#   74|   	if (!dvb->d.fe_parms) {
#   75|   		dvb_dev_free(&dvb->d);

Error: CPPCHECK_WARNING (CWE-401): [#def153]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:76: error[memleak]: Memory leak: dvb
#   74|   	if (!dvb->d.fe_parms) {
#   75|   		dvb_dev_free(&dvb->d);
#   76|-> 		return NULL;
#   77|   	}
#   78|   	parms = (void *)dvb->d.fe_parms;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:117:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:64:20: enter_function: entry to ‘dvb_dev_alloc’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:69:15: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:70:12: branch_false: following ‘false’ branch (when ‘dvb’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:74:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:75:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:75:17: call_function: calling ‘dvb_dev_free’ from ‘dvb_dev_alloc’
#  115|   		ops->free(dvb);
#  116|   
#  117|-> 	dvb_fe_close(dvb->d.fe_parms);
#  118|   
#  119|   	dvb_dev_free_devices(dvb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:122:1: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:64:20: enter_function: entry to ‘dvb_dev_alloc’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:69:15: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:70:12: branch_false: following ‘false’ branch (when ‘dvb’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:73:27: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:74:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:75:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:75:17: call_function: calling ‘dvb_dev_free’ from ‘dvb_dev_alloc’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:75:17: return_function: returning to ‘dvb_dev_alloc’ from ‘dvb_dev_free’
v4l-utils-1.32.0/lib/libdvbv5/dvb-dev.c:122:1: danger: ‘dvb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  120|   
#  121|   	free(dvb);
#  122|-> }
#  123|   
#  124|   void dvb_dev_dump_device(char *msg,

Error: CPPCHECK_WARNING (CWE-457): [#def156]
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:525: error[uninitvar]: Uninitialized variable: new_info
#  523|   		dvb_perror(_("Can't retrieve DVB information for the new delivery system."));
#  524|   	else
#  525|-> 		parms->p.info = new_info;
#  526|   
#  527|   	rc = dvb_add_parms_for_sys(&parms->p, sys);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def157]
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:957:54: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘v3_parms.u.ofdm.bandwidth’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:874:5: enter_function: entry to ‘__dvb_fe_set_parms’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:901:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:915:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:928:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:938:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:938:9: call_function: calling ‘dvb_fe_retrieve_parm’ from ‘__dvb_fe_set_parms’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:938:9: return_function: returning to ‘__dvb_fe_set_parms’ from ‘dvb_fe_retrieve_parm’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:939:9: call_function: calling ‘dvb_fe_retrieve_parm’ from ‘__dvb_fe_set_parms’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:939:9: return_function: returning to ‘__dvb_fe_set_parms’ from ‘dvb_fe_retrieve_parm’
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:956:30: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:957:54: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:957:54: danger: use of uninitialized value ‘v3_parms.u.ofdm.bandwidth’ here
#  955|   	case SYS_DVBT:
#  956|   		for (bw = 0; fe_bandwidth_name[bw] != 0; bw++) {
#  957|-> 			if (fe_bandwidth_name[bw] == v3_parms.u.ofdm.bandwidth)
#  958|   				break;
#  959|   		}

Error: CPPCHECK_WARNING (CWE-457): [#def158]
v4l-utils-1.32.0/lib/libdvbv5/dvb-fe.c:1554: error[uninitvar]: Uninitialized variable: event.status
# 1552|   		return -errno;
# 1553|   	}
# 1554|-> 	status = event.status;
# 1555|   	if (parms->p.verbose > 1) {
# 1556|   		dvb_log(_("Status: "));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb_file’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1558:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  247|   	fd = fopen(fname, "r");
#  248|   	if (!fd) {
#  249|-> 		perror(fname);
#  250|   		free(dvb_file);
#  251|   		return NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def160]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:306: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: entry
#  304|   			entry = entry->next;
#  305|   		}
#  306|-> 		entry->sat_number = -1;
#  307|   		entry->props[entry->n_props].cmd = DTV_DELIVERY_SYSTEM;
#  308|   		entry->props[entry->n_props++].u.data = fmt->delsys;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def161]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:306:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘entry’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  304|   			entry = entry->next;
#  305|   		}
#  306|-> 		entry->sat_number = -1;
#  307|   		entry->props[entry->n_props].cmd = DTV_DELIVERY_SYSTEM;
#  308|   		entry->props[entry->n_props++].u.data = fmt->delsys;

Error: CPPCHECK_WARNING (CWE-476): [#def162]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:307: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: entry
#  305|   		}
#  306|   		entry->sat_number = -1;
#  307|-> 		entry->props[entry->n_props].cmd = DTV_DELIVERY_SYSTEM;
#  308|   		entry->props[entry->n_props++].u.data = fmt->delsys;
#  309|   		has_inversion = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def163]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:308: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: entry
#  306|   		entry->sat_number = -1;
#  307|   		entry->props[entry->n_props].cmd = DTV_DELIVERY_SYSTEM;
#  308|-> 		entry->props[entry->n_props++].u.data = fmt->delsys;
#  309|   		has_inversion = 0;
#  310|   		for (i = 0; i < fmt->size; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:319:33: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb_file’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  317|   				p = NULL;
#  318|   			if (!p && !fmt->table[i].has_default_value) {
#  319|-> 				sprintf(err_msg, _("parameter %i (%s) missing"),
#  320|   					i, dvb_cmd_name(table->prop));
#  321|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:319:33: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  317|   				p = NULL;
#  318|   			if (!p && !fmt->table[i].has_default_value) {
#  319|-> 				sprintf(err_msg, _("parameter %i (%s) missing"),
#  320|   					i, dvb_cmd_name(table->prop));
#  321|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:328:41: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb_file’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  326|   						break;
#  327|   				if (j == table->size) {
#  328|-> 					sprintf(err_msg, _("parameter %s invalid: %s"),
#  329|   						dvb_cmd_name(table->prop), p);
#  330|   					goto error;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def167]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:351:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(2, 1)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  349|   					entry->video_pid = calloc(sizeof(*entry->video_pid), 1);
#  350|   					entry->video_pid_len = 1;
#  351|-> 					entry->video_pid[0] = v;
#  352|   					break;
#  353|   				case DTV_AUDIO_PID:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:356:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(2, 1)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  354|   					entry->audio_pid = calloc(sizeof(*entry->audio_pid), 1);
#  355|   					entry->audio_pid_len = 1;
#  356|-> 					entry->audio_pid[0] = v;
#  357|   					break;
#  358|   				case DTV_SERVICE_ID:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def169]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:362:65: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  360|   					break;
#  361|   				case DTV_CH_NAME:
#  362|-> 					entry->channel = calloc(strlen(p) + 1, 1);
#  363|   					strcpy(entry->channel, p);
#  364|   					break;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def170]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:363:41: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘calloc(strlen(p) + 1, 1)’ where non-null expected
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1563:28: call_function: calling ‘dvb_parse_format_oneline’ from ‘dvb_read_file_format’
#  361|   				case DTV_CH_NAME:
#  362|   					entry->channel = calloc(strlen(p) + 1, 1);
#  363|-> 					strcpy(entry->channel, p);
#  364|   					break;
#  365|   				default:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:444:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1582:5: enter_function: entry to ‘dvb_write_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1597:23: call_function: calling ‘dvb_write_format_oneline’ from ‘dvb_write_file_format’
#  442|   
#  443|   	for (entry = dvb_file->first_entry; entry != NULL; entry = entry->next) {
#  444|-> 		for (i = 0; i < entry->n_props; i++) {
#  445|   			if (entry->props[i].cmd == DTV_DELIVERY_SYSTEM) {
#  446|   				delsys = entry->props[i].u.data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:444:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1582:5: enter_function: entry to ‘dvb_write_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1597:23: call_function: calling ‘dvb_write_format_oneline’ from ‘dvb_write_file_format’
#  442|   
#  443|   	for (entry = dvb_file->first_entry; entry != NULL; entry = entry->next) {
#  444|-> 		for (i = 0; i < entry->n_props; i++) {
#  445|   			if (entry->props[i].cmd == DTV_DELIVERY_SYSTEM) {
#  446|   				delsys = entry->props[i].u.data;

Error: CPPCHECK_WARNING (CWE-401): [#def173]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:725: error[memleakOnRealloc]: Common realloc mistake: 'pid' nulled but not freed upon failure
#  723|   		return 0;
#  724|   	while (p) {
#  725|-> 		pid = realloc(pid, (len + 1) * sizeof (*pid));
#  726|   		pid[len] = atol(p);
#  727|   		p = strtok(NULL, " \t\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:762:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb_file’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1568:28: call_function: calling ‘dvb_read_file’ from ‘dvb_read_file_format’
#  760|   	fd = fopen(fname, "r");
#  761|   	if (!fd) {
#  762|-> 		perror(fname);
#  763|   		free(dvb_file);
#  764|   		return NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def175]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:788: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: entry
#  786|   				entry = entry->next;
#  787|   			}
#  788|-> 			entry->sat_number = -1;
#  789|   			p++;
#  790|   			p = strtok(p, "]");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def176]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:788:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘entry’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1568:28: call_function: calling ‘dvb_read_file’ from ‘dvb_read_file_format’
#  786|   				entry = entry->next;
#  787|   			}
#  788|-> 			entry->sat_number = -1;
#  789|   			p++;
#  790|   			p = strtok(p, "]");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def177]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:801:33: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘calloc(strlen(p) + 1, 1)’ where non-null expected
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1550:18: enter_function: entry to ‘dvb_read_file_format’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1568:28: call_function: calling ‘dvb_read_file’ from ‘dvb_read_file_format’
#  799|   			if (*p) {
#  800|   				entry->channel = calloc(strlen(p) + 1, 1);
#  801|-> 				strcpy(entry->channel, p);
#  802|   			}
#  803|   		} else {

Error: CPPCHECK_WARNING (CWE-476): [#def178]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1358: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: channel
# 1356|   				p++;
# 1357|   			channel = calloc(1, strlen(p) + 1);
# 1358|-> 			strcpy(channel, p);
# 1359|   
# 1360|   			r = asprintf(&vchannel, "%d.%d",

Error: GCC_ANALYZER_WARNING (CWE-688): [#def179]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1358:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘channel’ where non-null expected
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1340:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1355:32: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:35: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1358:25: danger: argument 1 (‘channel’) from [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
# 1356|   				p++;
# 1357|   			channel = calloc(1, strlen(p) + 1);
# 1358|-> 			strcpy(channel, p);
# 1359|   
# 1360|   			r = asprintf(&vchannel, "%d.%d",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1340:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1355:32: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:35: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1363:28: branch_true: following ‘true’ branch (when ‘r < 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: danger: ‘channel’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
# 1362|   				d->minor_channel_number);
# 1363|   			if (r < 0)
# 1364|-> 				dvb_perror("asprintf");
# 1365|   
# 1366|   			if (parms->p.verbose)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1340:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1348:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1349:17: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1355:32: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:45: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1357:35: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1363:28: branch_true: following ‘true’ branch (when ‘r < 0’)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1364:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1366:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1367:33: danger: ‘channel’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
# 1365|   
# 1366|   			if (parms->p.verbose)
# 1367|-> 				dvb_log(_("Virtual channel %s, name = %s"),
# 1368|   					vchannel, channel);
# 1369|   

Error: CPPCHECK_WARNING (CWE-476): [#def182]
v4l-utils-1.32.0/lib/libdvbv5/dvb-file.c:1394: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: channel
# 1392|   					p++;
# 1393|   				channel = calloc(strlen(p) + 1, 1);
# 1394|-> 				strcpy(channel, p);
# 1395|   			}
# 1396|   			dvb_log(_("Service %s, provider %s: %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:90:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:448:28: enter_function: entry to ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: call_function: calling ‘dvb_scan_alloc_handler_table’ from ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: return_function: returning to ‘dvb_get_ts_tables’ from ‘dvb_scan_alloc_handler_table’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:463:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:466:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:513:14: call_function: calling ‘dvb_read_section’ from ‘dvb_get_ts_tables’
#   88|   
#   89|   	/* `select' logfuncreturns 0 if timeout, 1 if input available, -1 if error. */
#   90|-> 	do ret = select (FD_SETSIZE, &set, NULL, NULL, &timeout);
#   91|   	while (!parms->p.abort && ret == -1 && errno == EINTR);
#   92|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:325:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tab.priv’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:448:28: enter_function: entry to ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: call_function: calling ‘dvb_scan_alloc_handler_table’ from ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: return_function: returning to ‘dvb_get_ts_tables’ from ‘dvb_scan_alloc_handler_table’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:463:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:466:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:513:14: call_function: calling ‘dvb_read_section’ from ‘dvb_get_ts_tables’
#  323|   		return ret;
#  324|   
#  325|-> 	if (dvb_set_section_filter(dmx_fd, sect->pid, 1,
#  326|   				   &sect->tid, &mask, NULL,
#  327|   				   DMX_IMMEDIATE_START | DMX_CHECK_CRC)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:358:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:635:28: enter_function: entry to ‘dvb_scan_transponder’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:672:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:678:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:685:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:689:41: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:688:28: call_function: calling ‘dvb_get_ts_tables’ from ‘dvb_scan_transponder’
#  356|   		}
#  357|   		if (available <= 0) {
#  358|-> 			dvb_logerr(_("%s: no data read on section filter"), __func__);
#  359|   			ret = -1;
#  360|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:365:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:635:28: enter_function: entry to ‘dvb_scan_transponder’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:672:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:678:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:685:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:689:41: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:688:28: call_function: calling ‘dvb_get_ts_tables’ from ‘dvb_scan_transponder’
#  363|   
#  364|   		if (!buf_length) {
#  365|-> 			dvb_logerr(_("%s: buf returned an empty buffer"), __func__);
#  366|   			ret = -1;
#  367|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:370:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:635:28: enter_function: entry to ‘dvb_scan_transponder’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:672:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:678:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:685:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:689:41: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:688:28: call_function: calling ‘dvb_get_ts_tables’ from ‘dvb_scan_transponder’
#  368|   		}
#  369|   		if (buf_length < 0) {
#  370|-> 			dvb_perror(_("dvb_read_section: read error"));
#  371|   			ret = -2;
#  372|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:375:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:635:28: enter_function: entry to ‘dvb_scan_transponder’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:672:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:678:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:685:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:689:41: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:688:28: call_function: calling ‘dvb_get_ts_tables’ from ‘dvb_scan_transponder’
#  373|   		}
#  374|   
#  375|-> 		crc = dvb_crc32(buf, buf_length, 0xFFFFFFFF);
#  376|   		if (crc != 0) {
#  377|   			dvb_logerr(_("%s: crc error"), __func__);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:466:12: warning[-Wanalyzer-malloc-leak]: leak of ‘dvb_scan_alloc_handler_table(delivery_system)’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:448:28: enter_function: entry to ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: call_function: calling ‘dvb_scan_alloc_handler_table’ from ‘dvb_get_ts_tables’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:462:28: return_function: returning to ‘dvb_get_ts_tables’ from ‘dvb_scan_alloc_handler_table’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:463:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:466:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:513:14: call_function: calling ‘dvb_read_section’ from ‘dvb_get_ts_tables’
#  464|   		return NULL;
#  465|   
#  466|-> 	if (!timeout_multiply)
#  467|   		timeout_multiply = 1;
#  468|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:879:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_entry’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:843:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:849:12: branch_false: following ‘false’ branch (when ‘new_entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:859:34: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:871:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:872:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:879:25: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:879:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:879:25: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:879:25: danger: ‘new_entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  877|   				n++;
#  878|   			}
#  879|-> 			dvb_log(_("New transponder/channel found: #%d: %d"),
#  880|   			        n, freq);
#  881|   			entry->next = new_entry;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:843:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:849:12: branch_false: following ‘false’ branch (when ‘new_entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:859:34: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:864:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:865:34: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:865:34: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  886|   
#  887|   	/* This should never happen */
#  888|-> 	dvb_logerr(_("BUG: Couldn't add %d to the scan frequency list."), freq);
#  889|   	free(new_entry);
#  890|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_entry’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:843:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:849:12: branch_false: following ‘false’ branch (when ‘new_entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:859:34: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:864:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:871:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:888:9: danger: ‘new_entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  886|   
#  887|   	/* This should never happen */
#  888|-> 	dvb_logerr(_("BUG: Couldn't add %d to the scan frequency list."), freq);
#  889|   	free(new_entry);
#  890|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:889:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:843:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:848:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:849:12: branch_false: following ‘false’ branch (when ‘new_entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:859:34: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:864:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:865:34: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:865:34: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-scan.c:889:9: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  887|   	/* This should never happen */
#  888|   	dvb_logerr(_("BUG: Couldn't add %d to the scan frequency list."), freq);
#  889|-> 	free(new_entry);
#  890|   
#  891|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:270:14: acquire_resource: opened here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:271:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:45: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: throw: if ‘dvb_retrieve_entry_prop’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: danger: ‘fopen(fname, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  275|   
#  276|   	for (entry = dvb_file->first_entry; entry != NULL; entry = entry->next) {
#  277|-> 		if (dvb_retrieve_entry_prop(entry, DTV_DELIVERY_SYSTEM, &delsys) < 0)
#  278|   			continue;
#  279|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:270:14: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:271:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:45: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: throw: if ‘dvb_retrieve_entry_prop’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: danger: ‘fopen(fname, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  275|   
#  276|   	for (entry = dvb_file->first_entry; entry != NULL; entry = entry->next) {
#  277|-> 		if (dvb_retrieve_entry_prop(entry, DTV_DELIVERY_SYSTEM, &delsys) < 0)
#  278|   			continue;
#  279|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:36: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:270:14: acquire_resource: opened here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:271:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:45: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:281:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:284:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:290:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:292:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:299:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:299:21: throw: if ‘dvb_retrieve_entry_prop’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:36: danger: ‘fopen(fname, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  278|   			continue;
#  279|   
#  280|-> 		for (i = 0; formats[i].delsys != 0; i++) {
#  281|   			if (formats[i].delsys == delsys)
#  282|   				break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:36: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:270:14: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:271:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:276:45: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:277:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:281:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:284:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:290:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:292:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:299:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:299:21: throw: if ‘dvb_retrieve_entry_prop’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/dvb-vdr-format.c:280:36: danger: ‘fopen(fname, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  278|   			continue;
#  279|   
#  280|-> 		for (i = 0; formats[i].delsys != 0; i++) {
#  281|   			if (formats[i].delsys == delsys)
#  282|   				break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:315:12: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(__builtin_alloca_with_align(strlen(output_charset) + 12, 8), input_charset)’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:314:22: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:315:12: danger: ‘iconv_open(__builtin_alloca_with_align(strlen(output_charset) + 12, 8), input_charset)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  313|   
#  314|   	iconv_t cd = iconv_open(out_cs, input_charset);
#  315|-> 	if (cd == (iconv_t)(-1)) {
#  316|   		memcpy(p, src, len);
#  317|   		p[len] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:323:17: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(__builtin_alloca_with_align(strlen(output_charset) + 12, 8), input_charset)’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:314:22: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:315:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:323:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:323:17: throw: if ‘iconv’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:323:17: danger: ‘iconv_open(__builtin_alloca_with_align(strlen(output_charset) + 12, 8), input_charset)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  321|   			dvb_log("Try setting GCONV_PATH to the bundled gconv dir.\n");
#  322|   	} else {
#  323|-> 		iconv(cd, (ICONV_CONST char **)&src, &len, &p, &destlen);
#  324|   		iconv_close(cd);
#  325|   		*p = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def200]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:464:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:453:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:458:29: branch_true: following ‘true’ branch (when ‘len > i’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:459:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:464:33: danger: ‘p’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  462|   				emphasis = 0;
#  463|   			else if (*s >= 0x20 && (*s < 0x80 || *s > 0x9f)) {
#  464|-> 				*p++ = *s;
#  465|   				if (emphasis)
#  466|   					*p2++ = *s;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def201]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:469:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:453:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:458:29: branch_true: following ‘true’ branch (when ‘len > i’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:459:29: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:463:33: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:468:33: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:469:33: danger: ‘p’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  467|   			}
#  468|   			else if (*s == 0x8a)
#  469|-> 				*p++ = '\n';
#  470|   		}
#  471|   		*p = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def202]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:471:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:453:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:471:17: danger: ‘p’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  469|   				*p++ = '\n';
#  470|   		}
#  471|-> 		*p = '\0';
#  472|   		*p2 = '\0';
#  473|   		len = p - (char *)tmp1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def203]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:472:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p2’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:454:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:472:17: danger: ‘p2’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  470|   		}
#  471|   		*p = '\0';
#  472|-> 		*p2 = '\0';
#  473|   		len = p - (char *)tmp1;
#  474|   		len2 = p2 - (char *)tmp2;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def204]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:504:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out_code’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:448:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:475:19: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:489:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:490:34: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:495:28: branch_true: following ‘true’ branch (when ‘code == 57478’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:504:26: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:504:25: danger: ‘out_code’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  502|   				continue;
#  503|   
#  504|-> 			*out_code++ = code;
#  505|   			if (emphasis)
#  506|   				*out_emph++ = code;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def205]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:506:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out_emph’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:448:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:475:19: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:485:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:489:29: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:490:34: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:505:28: branch_true: following ‘true’ branch (when ‘emphasis != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:506:34: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:506:33: danger: ‘out_emph’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  504|   			*out_code++ = code;
#  505|   			if (emphasis)
#  506|-> 				*out_emph++ = code;
#  507|   		}
#  508|   		*out_code = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def206]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:508:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out_code’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:448:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:475:19: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:508:17: danger: ‘out_code’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  506|   				*out_emph++ = code;
#  507|   		}
#  508|-> 		*out_code = 0;
#  509|   		*out_emph = 0;
#  510|   		len = (char *)out_code - (char *)tmp1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def207]
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:509:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out_emph’
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:386:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:393:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:448:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:475:19: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:484:24: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:485:24: acquire_memory: this call could return NULL
v4l-utils-1.32.0/lib/libdvbv5/parse_string.c:509:17: danger: ‘out_emph’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  507|   		}
#  508|   		*out_code = 0;
#  509|-> 		*out_emph = 0;
#  510|   		len = (char *)out_code - (char *)tmp1;
#  511|   		len2 = (char *)out_emph - (char *)tmp2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:169:17: warning[-Wanalyzer-malloc-leak]: leak of ‘event’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:28:9: enter_function: entry to ‘dvb_table_eit_init’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:37:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:53:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:75:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:79:20: branch_false: following ‘false’ branch (when ‘event’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:83:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:91:17: call_function: calling ‘dvb_time’ from ‘dvb_table_eit_init’
#  167|   
#  168|   	mjd   = *(uint16_t *) data;
#  169|-> 	hour  = dvb_bcd(data[2]);
#  170|   	min   = dvb_bcd(data[3]);
#  171|   	sec   = dvb_bcd(data[4]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:170:17: warning[-Wanalyzer-malloc-leak]: leak of ‘event’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:28:9: enter_function: entry to ‘dvb_table_eit_init’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:37:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:53:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:75:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:79:20: branch_false: following ‘false’ branch (when ‘event’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:83:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:91:17: call_function: calling ‘dvb_time’ from ‘dvb_table_eit_init’
#  168|   	mjd   = *(uint16_t *) data;
#  169|   	hour  = dvb_bcd(data[2]);
#  170|-> 	min   = dvb_bcd(data[3]);
#  171|   	sec   = dvb_bcd(data[4]);
#  172|   	year  = ((mjd - 15078.2) / 365.25);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:171:17: warning[-Wanalyzer-malloc-leak]: leak of ‘event’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:28:9: enter_function: entry to ‘dvb_table_eit_init’
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:37:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:43:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:53:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:75:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:78:25: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:79:20: branch_false: following ‘false’ branch (when ‘event’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:83:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/eit.c:91:17: call_function: calling ‘dvb_time’ from ‘dvb_table_eit_init’
#  169|   	hour  = dvb_bcd(data[2]);
#  170|   	min   = dvb_bcd(data[3]);
#  171|-> 	sec   = dvb_bcd(data[4]);
#  172|   	year  = ((mjd - 15078.2) / 365.25);
#  173|   	month = ((mjd - 14956.1 - (int) (year * 365.25)) / 30.6001);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:102:17: warning[-Wanalyzer-malloc-leak]: leak of ‘channel’
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:40:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:46:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:46:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:52:14: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:70:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:73:21: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:73:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:80:27: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:80:27: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:81:20: branch_false: following ‘false’ branch (when ‘channel’ is non-NULL)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:86:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_true: following ‘true’ branch (when ‘i != 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:91:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:90:29: branch_false: following ‘false’ branch (when ‘i == 7’)...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:93:17: branch_false: ...to here
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:102:17: throw: if ‘dvb_iconv_to_charset’ throws an exception...
v4l-utils-1.32.0/lib/libdvbv5/tables/vct.c:102:17: danger: ‘channel’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  100|   
#  101|   		/* Short name is always UTF-16 */
#  102|-> 		dvb_iconv_to_charset(parms, channel->short_name,
#  103|   				     sizeof(channel->short_name),
#  104|   				     (const unsigned char *)channel->__short_name,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def212]
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:52:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:45:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:49:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:49:17: acquire_resource: ‘va_start’ called here
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:52:22: throw: if ‘v4l1_open’ throws an exception...
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:52:22: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   50|   		mode = va_arg(ap, PROMOTED_MODE_T);
#   51|   
#   52|-> 		fd = v4l1_open(file, oflag, mode);
#   53|   
#   54|   		va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def213]
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:73:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:66:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:70:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:70:17: acquire_resource: ‘va_start’ called here
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:73:22: throw: if ‘v4l1_open’ throws an exception...
v4l-utils-1.32.0/lib/libv4l1/v4l1compat.c:73:22: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   71|   		mode = va_arg(ap, mode_t);
#   72|   
#   73|-> 		fd = v4l1_open(file, oflag | O_LARGEFILE, mode);
#   74|   
#   75|   		va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-685): [#def214]
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:70:24: warning[-Wanalyzer-va-list-exhausted]: ‘ap’ has no more arguments (0 consumed)
/usr/include/fcntl.h:219:12: enter_function: entry to ‘open64’
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:96:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:107:22: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:107:22: call_function: calling ‘open’ from ‘open64’ with 0 variadic arguments
#   68|   
#   69|   		va_start(ap, oflag);
#   70|-> 		mode = va_arg(ap, PROMOTED_MODE_T);
#   71|   
#   72|   		fd = SYS_OPEN(file, oflag, mode);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def215]
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:85:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
/usr/include/fcntl.h:219:12: enter_function: entry to ‘open64’
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:96:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:100:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:100:17: acquire_resource: ‘va_start’ called here
v4l-utils-1.32.0/lib/libv4l2/v4l2convert.c:103:22: call_function: calling ‘open’ from ‘open64’
#   83|   	/* Try to Register with libv4l2 (in case of failure pass the fd to the
#   84|   	   application as is) */
#   85|-> 	v4l2_fd_open(fd, 0);
#   86|   
#   87|   	return fd;

Error: CPPCHECK_WARNING (CWE-909): [#def216]
v4l-utils-1.32.0/lib/libv4l2rds/libv4l2rds.c:461: error[uninitStructMember]: Uninitialized struct member: msg.additional
#  459|   
#  460|   	/* decoding done, store the new message */
#  461|-> 	priv_state->handle.tmc.tmc_msg = msg;
#  462|   	priv_state->handle.valid_fields |= V4L2_RDS_TMC_SG;
#  463|   	priv_state->handle.valid_fields &= ~V4L2_RDS_TMC_MG;

Error: CPPCHECK_WARNING (CWE-909): [#def217]
v4l-utils-1.32.0/lib/libv4l2rds/libv4l2rds.c:461: error[uninitStructMember]: Uninitialized struct member: msg.length
#  459|   
#  460|   	/* decoding done, store the new message */
#  461|-> 	priv_state->handle.tmc.tmc_msg = msg;
#  462|   	priv_state->handle.valid_fields |= V4L2_RDS_TMC_SG;
#  463|   	priv_state->handle.valid_fields &= ~V4L2_RDS_TMC_MG;

Error: CPPCHECK_WARNING (CWE-457): [#def218]
v4l-utils-1.32.0/lib/libv4l2rds/libv4l2rds.c:461: error[uninitvar]: Uninitialized variables: msg.length, msg.additional
#  459|   
#  460|   	/* decoding done, store the new message */
#  461|-> 	priv_state->handle.tmc.tmc_msg = msg;
#  462|   	priv_state->handle.valid_fields |= V4L2_RDS_TMC_SG;
#  463|   	priv_state->handle.valid_fields &= ~V4L2_RDS_TMC_MG;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def219]
v4l-utils-1.32.0/lib/libv4l2rds/libv4l2rds.c:461:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘msg.length’
#  459|   
#  460|   	/* decoding done, store the new message */
#  461|-> 	priv_state->handle.tmc.tmc_msg = msg;
#  462|   	priv_state->handle.valid_fields |= V4L2_RDS_TMC_SG;
#  463|   	priv_state->handle.valid_fields &= ~V4L2_RDS_TMC_MG;

Error: CPPCHECK_WARNING (CWE-476): [#def220]
v4l-utils-1.32.0/lib/libv4l2rds/libv4l2rds.c:1335: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: internal_handle
# 1333|   	struct rds_private_state *internal_handle =
# 1334|   		calloc(1, sizeof(struct rds_private_state));
# 1335|-> 	internal_handle->handle.is_rbds = is_rbds;
# 1336|   
# 1337|   	return (struct v4l2_rds *)internal_handle;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:486:25: warning[-Wanalyzer-malloc-leak]: leak of ‘trimmed_dmi’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:482:23: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:485:41: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:486:25: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:486:25: throw: if ‘fnmatch’ throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:486:25: danger: ‘trimmed_dmi’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  484|   	/* find trimmed value */
#  485|   	for (entry_ptr = table_entries; *entry_ptr;  entry_ptr++) {
#  486|-> 		found = fnmatch(*entry_ptr, trimmed_dmi, 0) == 0;
#  487|   		/* fprintf(stderr, "find_dmi_string('%s', '%s'->'%s')=%i\n", *entry_ptr, dmi_value, trimmed_dmi, found); */
#  488|   		if (found)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:594:14: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:582:40: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:584:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:589:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:594:14: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:594:14: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  592|   
#  593|   	/* Check if the driver has indicated some form of flipping is needed */
#  594|-> 	if ((data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
#  595|   				  VIDIOC_G_INPUT, &input.index) == 0) &&
#  596|   	    (data->dev_ops->ioctl(data->dev_ops_priv, data->fd,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:596:14: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:582:40: acquire_memory: allocated here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:584:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:589:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:594:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:596:14: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:596:14: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:596:14: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  594|   	if ((data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
#  595|   				  VIDIOC_G_INPUT, &input.index) == 0) &&
#  596|-> 	    (data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
#  597|   	    			VIDIOC_ENUMINPUT, &input) == 0)) {
#  598|   		if (input.status & V4L2_IN_ST_HFLIP)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:983:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dst.controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:975:5: enter_function: entry to ‘v4lcontrol_vidioc_g_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:982:9: call_function: calling ‘v4lcontrol_alloc_valid_controls’ from ‘v4lcontrol_vidioc_g_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:982:9: return_function: returning to ‘v4lcontrol_vidioc_g_ext_ctrls’ from ‘v4lcontrol_alloc_valid_controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:983:15: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:983:15: danger: ‘dst.controls’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  981|   
#  982|   	v4lcontrol_alloc_valid_controls(data, ctrls, &dst);
#  983|-> 	res = data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
#  984|   			VIDIOC_G_EXT_CTRLS, &dst);
#  985|   	v4lcontrol_free_valid_controls(data, ctrls, &dst);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1054:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dst.controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1044:5: enter_function: entry to ‘v4lcontrol_vidioc_try_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1050:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1053:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1053:9: call_function: calling ‘v4lcontrol_alloc_valid_controls’ from ‘v4lcontrol_vidioc_try_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1053:9: return_function: returning to ‘v4lcontrol_vidioc_try_ext_ctrls’ from ‘v4lcontrol_alloc_valid_controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1054:15: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1054:15: danger: ‘dst.controls’ leaks here; was allocated at [(10)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/9)
# 1052|   
# 1053|   	v4lcontrol_alloc_valid_controls(data, ctrls, &dst);
# 1054|-> 	res = data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
# 1055|   			VIDIOC_TRY_EXT_CTRLS, &dst);
# 1056|   	v4lcontrol_free_valid_controls(data, ctrls, &dst);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1071:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dst.controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1060:5: enter_function: entry to ‘v4lcontrol_vidioc_s_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1067:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1070:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1070:9: call_function: calling ‘v4lcontrol_alloc_valid_controls’ from ‘v4lcontrol_vidioc_s_ext_ctrls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1070:9: return_function: returning to ‘v4lcontrol_vidioc_s_ext_ctrls’ from ‘v4lcontrol_alloc_valid_controls’
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1071:15: throw: if the called function throws an exception...
v4l-utils-1.32.0/lib/libv4lconvert/control/libv4lcontrol.c:1071:15: danger: ‘dst.controls’ leaks here; was allocated at [(10)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/9)
# 1069|   
# 1070|   	v4lcontrol_alloc_valid_controls(data, ctrls, &dst);
# 1071|-> 	res = data->dev_ops->ioctl(data->dev_ops_priv, data->fd,
# 1072|   			VIDIOC_S_EXT_CTRLS, &dst);
# 1073|   	v4lcontrol_free_valid_controls(data, ctrls, &dst);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def227]
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:139:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*data.previous_frame’
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:45:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:50:13: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:50:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:51:40: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:52:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:58:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:12: branch_false: following ‘false’ branch (when ‘src_size > 63’)...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:68:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:68:46: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:69:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:70:25: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:71:26: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:72:26: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:73:26: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:74:26: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:67:13: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:79:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:79:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:86:9: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:89:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:139:52: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/cpia1.c:139:17: danger: use of uninitialized value ‘*data.previous_frame’ here
#  137|   		/* Pre-fill dest with previous frame, as the cpia1 "compression" consists
#  138|   		   of simply ommitting certain pixels */
#  139|-> 		memcpy(dest, data->previous_frame, width * height * 3 / 2);
#  140|   
#  141|   		for (y = 0; y < height && src_size > 2; y++) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:78:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*data.decompress_out_pipe[0], 0)’
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:54:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:59:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:59:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:64:32: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:65:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:70:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:70:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:74:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:78:21: acquire_resource: opened here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:78:20: danger: ‘dup2(*data.decompress_out_pipe[0], 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   76|   
#   77|   		/* Connect stdin / out to the pipes */
#   78|-> 		if (dup2(data->decompress_out_pipe[READ_END], STDIN_FILENO) == -1) {
#   79|   			perror("libv4lconvert: error with helper dup2");
#   80|   			exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:82:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*data.decompress_in_pipe[1], 1)’
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:54:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:59:18: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:59:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:64:32: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:65:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:70:12: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:70:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:74:17: branch_true: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:78:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:82:21: branch_false: ...to here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:82:21: acquire_resource: opened here
v4l-utils-1.32.0/lib/libv4lconvert/helper.c:82:20: danger: ‘dup2(*data.decompress_in_pipe[1], 1)’ leaks here; was opened at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#   80|   			exit(1);
#   81|   		}
#   82|-> 		if (dup2(data->decompress_in_pipe[WRITE_END], STDOUT_FILENO) == -1) {
#   83|   			perror("libv4lconvert: error with helper dup2");
#   84|   			exit(1);

Error: CPPCHECK_WARNING (CWE-682): [#def230]
v4l-utils-1.32.0/lib/libv4lconvert/jpgl.c:464: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  462|   	
#  463|   		Yline_baseptr = mainbuffer;
#  464|-> 		Uline_baseptr = mainbuffer + (4 * img_width);
#  465|   		Vline_baseptr = Uline_baseptr + (img_width + 4);
#  466|   		break;

Error: CPPCHECK_WARNING (CWE-758): [#def231]
v4l-utils-1.32.0/lib/libv4lconvert/libv4lconvert.c:475: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
#  473|   		/* is this format supported? */
#  474|   		if (!(data->framesize_supported_src_formats[best_framesize] &
#  475|-> 		      (1ULL << i)))
#  476|   			continue;
#  477|   

Error: COMPILER_WARNING: [#def232]
v4l-utils-1.32.0/lib/libv4lconvert/sn9c2028-decomp.c: scope_hint: In function ‘v4lconvert_decode_sn9c2028’
v4l-utils-1.32.0/lib/libv4lconvert/sn9c2028-decomp.c:134:23: warning[-Wunused-but-set-variable=]: variable ‘bits_eaten’ set but not used
#  134 |         unsigned long bits_eaten = 0;
#      |                       ^~~~~~~~~~
#  132|   	unsigned long bitBuf = 0;
#  133|   	unsigned long bitBufCount = 0;
#  134|-> 	unsigned long bits_eaten = 0;
#  135|   
#  136|   	src += 12;    /* Remove the header */

Error: CPPCHECK_WARNING (CWE-758): [#def233]
v4l-utils-1.32.0/utils/common/ir-encode.c:302: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  300|   {
#  301|   	while (count--) {
#  302|-> 		if (bits & (1 << count)) {
#  303|   			rc6_advance_pulse(buf, n, length);
#  304|   			rc6_advance_space(buf, n, length);

Error: CPPCHECK_WARNING (CWE-401): [#def234]
v4l-utils-1.32.0/utils/common/keymap.c:95: error[memleak]: Memory leak: map
#   93|   	if (!fin) {
#   94|   		fprintf(stderr, _("%s: error: cannot open: %m\n"), fname);
#   95|-> 		return EINVAL;
#   96|   	}
#   97|   

Error: CPPCHECK_WARNING (CWE-476): [#def235]
v4l-utils-1.32.0/utils/common/keymap.c:127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: k
#  125|   
#  126|   							k = calloc(1, sizeof(*k));
#  127|-> 							k->protocol = strdup(p);
#  128|   							k->next = map->next;
#  129|   							map->next = k;

Error: CPPCHECK_WARNING (CWE-476): [#def236]
v4l-utils-1.32.0/utils/common/keymap.c:128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: k
#  126|   							k = calloc(1, sizeof(*k));
#  127|   							k->protocol = strdup(p);
#  128|-> 							k->next = map->next;
#  129|   							map->next = k;
#  130|   						}

Error: CPPCHECK_WARNING (CWE-476): [#def237]
v4l-utils-1.32.0/utils/common/keymap.c:402: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: param
#  400|   
#  401|   			param = malloc(sizeof(*param));
#  402|-> 			param->name = strdup(key);
#  403|   			param->value = value;
#  404|   			param->next = map->param;

Error: CPPCHECK_WARNING (CWE-476): [#def238]
v4l-utils-1.32.0/utils/common/keymap.c:403: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: param
#  401|   			param = malloc(sizeof(*param));
#  402|   			param->name = strdup(key);
#  403|-> 			param->value = value;
#  404|   			param->next = map->param;
#  405|   			map->param = param;

Error: CPPCHECK_WARNING (CWE-476): [#def239]
v4l-utils-1.32.0/utils/common/keymap.c:404: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: param
#  402|   			param->name = strdup(key);
#  403|   			param->value = value;
#  404|-> 			param->next = map->param;
#  405|   			map->param = param;
#  406|   			if (verbose)

Error: CPPCHECK_WARNING (CWE-476): [#def240]
v4l-utils-1.32.0/utils/common/keymap.c:407: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: param
#  405|   			map->param = param;
#  406|   			if (verbose)
#  407|-> 				fprintf(stderr, _("%s: protocol parameter %s=%ld\n"), fname, param->name, param->value);
#  408|   		}
#  409|   	}

Error: GCC_ANALYZER_WARNING (CWE-479): [#def241]
v4l-utils-1.32.0/utils/dvb/dvb-fe-tool.c:99:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
v4l-utils-1.32.0/utils/dvb/dvb-fe-tool.c:93:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
 call_function: calling ‘do_timeout’ from ‘do_timeout’
#   97|   	} else {
#   98|   		/* something has gone wrong ... exit */
#   99|-> 		exit(1);
#  100|   	}
#  101|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def242]
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:223:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1338:14: enter_function: entry to ‘start_server’
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1365:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1367:34: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1370:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1373:23: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1373:23: call_function: calling ‘scan_data’ from ‘start_server’
#  221|   	char **strings = NULL;
#  222|   
#  223|-> 	nptrs = backtrace(buffer, sizeof(buffer));
#  224|   
#  225|   	if (nptrs) {

Error: CPPCHECK_WARNING (CWE-664): [#def243]
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:499: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  497|   				dbg("buffer to short for string length");
#  498|   				stack_dump();
#  499|-> 				return -1;
#  500|   			}
#  501|   			len = be32toh(*(int32_t *)p);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def244]
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:499:40: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1338:14: enter_function: entry to ‘start_server’
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1365:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1367:34: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1370:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1373:23: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:1373:23: call_function: calling ‘scan_data’ from ‘start_server’
#  497|   				dbg("buffer to short for string length");
#  498|   				stack_dump();
#  499|-> 				return -1;
#  500|   			}
#  501|   			len = be32toh(*(int32_t *)p);

Error: CPPCHECK_WARNING (CWE-664): [#def245]
v4l-utils-1.32.0/utils/dvb/dvbv5-daemon.c:567: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  565|   	if (ret <= 0) {
#  566|   		local_perror("vasprintf");
#  567|-> 		return;
#  568|   	}
#  569|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def246]
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:211:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘status’
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:191:21: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:207:13: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:207:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:211:16: branch_false: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:211:16: danger: use of uninitialized value ‘status’ here
#  209|   	}
#  210|   
#  211|-> 	return (status & FE_HAS_LOCK) ? 0 : -1;
#  212|   }
#  213|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def247]
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:444:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:438:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:439:17: branch_true: ...to here
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:435:13: enter_function: entry to ‘do_timeout’
v4l-utils-1.32.0/utils/dvb/dvbv5-scan.c:438:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
 call_function: calling ‘do_timeout’ from ‘do_timeout’
#  442|   	} else {
#  443|   		/* something has gone wrong ... exit */
#  444|-> 		exit(1);
#  445|   	}
#  446|   }

Error: GCC_ANALYZER_WARNING (CWE-479): [#def248]
v4l-utils-1.32.0/utils/dvb/dvbv5-zap.c:372:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
v4l-utils-1.32.0/utils/dvb/dvbv5-zap.c:365:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
 call_function: calling ‘do_timeout’ from ‘do_timeout’
#  370|   		/* something has gone wrong ... exit */
#  371|   		fprintf(stderr, "Forcing program stop due to timeout or terminate signal\n");
#  372|-> 		exit(1);
#  373|   	}
#  374|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:30: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:30: throw: if ‘protocol_match’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:30: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  266|   			*scancodestr++ = 0;
#  267|   
#  268|-> 			if (!protocol_match(p, &proto)) {
#  269|   				fprintf(stderr, _("error: %s:%d: protocol '%s' not found\n"), fname, lineno, p);
#  270|   				fclose(input);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: throw: if ‘protocol_encoder_available’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  280|   			}
#  281|   
#  282|-> 			if (!protocol_encoder_available(proto)) {
#  283|   				fprintf(stderr, _("error: %s:%d: no encoder available for `%s'\n"), fname, lineno, protocol_name(proto));
#  284|   				fclose(input);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:283:33: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:283:33: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:283:33: throw: if ‘protocol_name’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:283:33: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  281|   
#  282|   			if (!protocol_encoder_available(proto)) {
#  283|-> 				fprintf(stderr, _("error: %s:%d: no encoder available for `%s'\n"), fname, lineno, protocol_name(proto));
#  284|   				fclose(input);
#  285|   				free(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: throw: if ‘protocol_scancode_valid’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  287|   			}
#  288|   
#  289|-> 			protocol_scancode_valid(&proto, &scancode);
#  290|   
#  291|   			if (len + protocol_max_size(proto) >= LIRCBUF_SIZE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:291:35: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:291:35: throw: if ‘protocol_max_size’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:291:35: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  289|   			protocol_scancode_valid(&proto, &scancode);
#  290|   
#  291|-> 			if (len + protocol_max_size(proto) >= LIRCBUF_SIZE) {
#  292|   				fprintf(stderr, _("error: %s:%d: too much IR for one transmit\n"), fname, lineno);
#  293|   				fclose(input);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:298:35: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:291:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:298:35: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:298:35: throw: if ‘protocol_carrier’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:298:35: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  296|   			}
#  297|   
#  298|-> 			carrier = protocol_carrier(proto);
#  299|   			if (f->carrier && f->carrier != carrier)
#  300|   				fprintf(stderr, _("error: %s:%d: carrier already specified\n"), fname, lineno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:304:32: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:224:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:225:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:229:9: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:233:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:235:17: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:243:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:21: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:248:20: branch_true: following ‘true’ branch (when the strings are equal)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:253:28: branch_true: following ‘true’ branch (when ‘expect_pulse != 0’)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:258:39: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:259:28: branch_false: following ‘false’ branch (when ‘scancodestr’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:266:26: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:268:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:275:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:30: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:282:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:289:25: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:291:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:298:35: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:304:32: throw: if ‘protocol_encode’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:304:32: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  302|   				f->carrier = carrier;
#  303|   
#  304|-> 			len += protocol_encode(proto, scancode, f->buf + len);
#  305|   			expect_pulse = false;
#  306|   			continue;

Error: COMPILER_WARNING (CWE-704): [#def256]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c: scope_hint: In function ‘read_scancode’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:530:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  530 |         char *p = strchr(name, ':');
#      |                   ^~~~~~
#  528|   	unsigned scancode;
#  529|   	char *pstr;
#  530|-> 	char *p = strchr(name, ':');
#  531|   
#  532|   	if (!p) {

Error: COMPILER_WARNING (CWE-704): [#def257]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:530:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  528|   	unsigned scancode;
#  529|   	char *pstr;
#  530|-> 	char *p = strchr(name, ':');
#  531|   
#  532|   	if (!p) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:537:30: warning[-Wanalyzer-malloc-leak]: leak of ‘read_scancode(arg)’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:586:16: enter_function: entry to ‘parse_opt’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:692:21: call_function: calling ‘read_scancode’ from ‘parse_opt’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:692:21: return_function: returning to ‘parse_opt’ from ‘read_scancode’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:693:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:696:17: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:696:17: call_function: calling ‘add_to_send_list’ from ‘parse_opt’
#  535|   	}
#  536|   
#  537|-> 	pstr = strndup(name, p - name);
#  538|   
#  539|   	if (!protocol_match(pstr, &proto)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:539:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pstr’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:532:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:537:30: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:537:16: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:539:14: throw: if ‘protocol_match’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:539:14: danger: ‘pstr’ leaks here; was allocated at [(4)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/3)
#  537|   	pstr = strndup(name, p - name);
#  538|   
#  539|-> 	if (!protocol_match(pstr, &proto)) {
#  540|   		fprintf(stderr, _("error: protocol '%s' not found\n"), pstr);
#  541|   		free(pstr);

Error: CPPCHECK_WARNING (CWE-476): [#def260]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:575: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gap
#  573|   		// introduce gap
#  574|   		struct send *gap = malloc(sizeof(*gap));
#  575|-> 		gap->ty = SEND_GAP;
#  576|   		gap->fname= NULL;
#  577|   		gap->gap = arguments->gap;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:575:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘gap’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:570:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:574:36: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:574:36: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:575:17: danger: ‘gap’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  573|   		// introduce gap
#  574|   		struct send *gap = malloc(sizeof(*gap));
#  575|-> 		gap->ty = SEND_GAP;
#  576|   		gap->fname= NULL;
#  577|   		gap->gap = arguments->gap;

Error: CPPCHECK_WARNING (CWE-476): [#def262]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:576: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gap
#  574|   		struct send *gap = malloc(sizeof(*gap));
#  575|   		gap->ty = SEND_GAP;
#  576|-> 		gap->fname= NULL;
#  577|   		gap->gap = arguments->gap;
#  578|   		gap->next = send;

Error: CPPCHECK_WARNING (CWE-476): [#def263]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:577: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gap
#  575|   		gap->ty = SEND_GAP;
#  576|   		gap->fname= NULL;
#  577|-> 		gap->gap = arguments->gap;
#  578|   		gap->next = send;
#  579|   

Error: CPPCHECK_WARNING (CWE-476): [#def264]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:578: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gap
#  576|   		gap->fname= NULL;
#  577|   		gap->gap = arguments->gap;
#  578|-> 		gap->next = send;
#  579|   
#  580|   		struct send *p = arguments->send;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:584:1: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:586:16: enter_function: entry to ‘parse_opt’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:702:21: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:703:20: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:705:24: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:708:17: call_function: calling ‘add_to_send_list’ from ‘parse_opt’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:708:17: return_function: returning to ‘parse_opt’ from ‘add_to_send_list’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:733:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:584:1: danger: ‘s’ leaks here; was allocated at [(4)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/3)
#  582|   		p->next = gap;
#  583|   	}
#  584|-> }
#  585|   
#  586|   static error_t parse_opt(int k, char *arg, struct argp_state *state)

Error: CPPCHECK_WARNING (CWE-476): [#def266]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:756: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  754|   			if (!s) {
#  755|   				s = malloc(sizeof(*s) + re->raw_length * sizeof(int));
#  756|-> 				s->len = re->raw_length;
#  757|   				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|   				s->ty = SEND_RAW;

Error: CPPCHECK_WARNING (CWE-476): [#def267]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:757: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  755|   				s = malloc(sizeof(*s) + re->raw_length * sizeof(int));
#  756|   				s->len = re->raw_length;
#  757|-> 				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|   				s->ty = SEND_RAW;
#  759|   				s->carrier = keymap_param(map, "carrier", 0);

Error: CPPCHECK_WARNING (CWE-476): [#def268]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:758: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  756|   				s->len = re->raw_length;
#  757|   				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|-> 				s->ty = SEND_RAW;
#  759|   				s->carrier = keymap_param(map, "carrier", 0);
#  760|   				s->next = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def269]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:758:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:744:15: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:748:22: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:754:28: branch_true: following ‘true’ branch (when ‘s’ is NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:755:57: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:755:37: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:758:33: danger: ‘s’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  756|   				s->len = re->raw_length;
#  757|   				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|-> 				s->ty = SEND_RAW;
#  759|   				s->carrier = keymap_param(map, "carrier", 0);
#  760|   				s->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def270]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:759: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  757|   				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|   				s->ty = SEND_RAW;
#  759|-> 				s->carrier = keymap_param(map, "carrier", 0);
#  760|   				s->next = NULL;
#  761|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:759:46: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:744:15: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:748:22: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:754:28: branch_true: following ‘true’ branch (when ‘s’ is NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:755:57: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:755:37: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:759:46: throw: if ‘keymap_param’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:759:46: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  757|   				memcpy(s->buf, re->raw, s->len * sizeof(int));
#  758|   				s->ty = SEND_RAW;
#  759|-> 				s->carrier = keymap_param(map, "carrier", 0);
#  760|   				s->next = NULL;
#  761|   			}

Error: CPPCHECK_WARNING (CWE-476): [#def272]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:760: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  758|   				s->ty = SEND_RAW;
#  759|   				s->carrier = keymap_param(map, "carrier", 0);
#  760|-> 				s->next = NULL;
#  761|   			}
#  762|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def273]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:781: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  779|   			if (protocol_match(proto_str, &proto)) {
#  780|   				s = malloc(sizeof(*s));
#  781|-> 				s->protocol = proto;
#  782|   				s->scancode = se->scancode;
#  783|   				s->ty = SEND_SCANCODE;

Error: CPPCHECK_WARNING (CWE-476): [#def274]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:782: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  780|   				s = malloc(sizeof(*s));
#  781|   				s->protocol = proto;
#  782|-> 				s->scancode = se->scancode;
#  783|   				s->ty = SEND_SCANCODE;
#  784|   				s->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def275]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:783: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  781|   				s->protocol = proto;
#  782|   				s->scancode = se->scancode;
#  783|-> 				s->ty = SEND_SCANCODE;
#  784|   				s->next = NULL;
#  785|   			} else if (encode_bpf_protocol(map, se->scancode,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def276]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:783:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:744:15: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:748:22: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:774:28: branch_false: following ‘false’ branch (when ‘s’ is NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:777:37: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:779:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:780:37: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:780:37: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:783:33: danger: ‘s’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  781|   				s->protocol = proto;
#  782|   				s->scancode = se->scancode;
#  783|-> 				s->ty = SEND_SCANCODE;
#  784|   				s->next = NULL;
#  785|   			} else if (encode_bpf_protocol(map, se->scancode,

Error: CPPCHECK_WARNING (CWE-476): [#def277]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:784: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  782|   				s->scancode = se->scancode;
#  783|   				s->ty = SEND_SCANCODE;
#  784|-> 				s->next = NULL;
#  785|   			} else if (encode_bpf_protocol(map, se->scancode,
#  786|   						       buf, &length)) {

Error: CPPCHECK_WARNING (CWE-476): [#def278]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:788: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  786|   						       buf, &length)) {
#  787|   				s = malloc(sizeof(*s) + sizeof(int) * length);
#  788|-> 				s->len = length;
#  789|   				memcpy(s->buf, buf, length * sizeof(int));
#  790|   				s->ty = SEND_RAW;

Error: CPPCHECK_WARNING (CWE-476): [#def279]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:789: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  787|   				s = malloc(sizeof(*s) + sizeof(int) * length);
#  788|   				s->len = length;
#  789|-> 				memcpy(s->buf, buf, length * sizeof(int));
#  790|   				s->ty = SEND_RAW;
#  791|   				s->carrier = keymap_param(map, "carrier", 0);

Error: CPPCHECK_WARNING (CWE-476): [#def280]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:790: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  788|   				s->len = length;
#  789|   				memcpy(s->buf, buf, length * sizeof(int));
#  790|-> 				s->ty = SEND_RAW;
#  791|   				s->carrier = keymap_param(map, "carrier", 0);
#  792|   				s->next = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def281]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:790:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:744:15: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:748:22: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:774:28: branch_false: following ‘false’ branch (when ‘s’ is NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:777:37: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:785:61: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:785:35: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:787:44: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:787:37: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:790:33: danger: ‘s’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
#  788|   				s->len = length;
#  789|   				memcpy(s->buf, buf, length * sizeof(int));
#  790|-> 				s->ty = SEND_RAW;
#  791|   				s->carrier = keymap_param(map, "carrier", 0);
#  792|   				s->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def282]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:791: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  789|   				memcpy(s->buf, buf, length * sizeof(int));
#  790|   				s->ty = SEND_RAW;
#  791|-> 				s->carrier = keymap_param(map, "carrier", 0);
#  792|   				s->next = NULL;
#  793|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:791:46: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:744:15: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:748:22: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:774:28: branch_false: following ‘false’ branch (when ‘s’ is NULL)...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:777:37: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:785:61: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:785:35: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:787:44: branch_true: ...to here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:787:37: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:791:46: throw: if ‘keymap_param’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:791:46: danger: ‘s’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
#  789|   				memcpy(s->buf, buf, length * sizeof(int));
#  790|   				s->ty = SEND_RAW;
#  791|-> 				s->carrier = keymap_param(map, "carrier", 0);
#  792|   				s->next = NULL;
#  793|   			} else {

Error: CPPCHECK_WARNING (CWE-476): [#def284]
v4l-utils-1.32.0/utils/ir-ctl/ir-ctl.c:792: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  790|   				s->ty = SEND_RAW;
#  791|   				s->carrier = keymap_param(map, "carrier", 0);
#  792|-> 				s->next = NULL;
#  793|   			} else {
#  794|   				fprintf(stderr, _("error: protocol '%s' not supported\n"), proto_str);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:104:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  102|   		while (*p == ' ' || *p == '\t')
#  103|   			p++;
#  104|-> 		if (line_no==1 && p[0] == '#') {
#  105|   			p++;
#  106|   			p = strtok(p, "\n\t =:");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:104:21: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  102|   		while (*p == ' ' || *p == '\t')
#  103|   			p++;
#  104|-> 		if (line_no==1 && p[0] == '#') {
#  105|   			p++;
#  106|   			p = strtok(p, "\n\t =:");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def287]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:127:57: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘k’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  125|   
#  126|   							k = calloc(1, sizeof(*k));
#  127|-> 							k->protocol = strdup(p);
#  128|   							k->next = map->next;
#  129|   							map->next = k;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:188:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  186|   		line_no, fname);
#  187|   	return EINVAL;
#  188|-> }
#  189|   
#  190|   static error_t parse_rawir_string(const char *fname, char *str, struct raw_entry **entry)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def289]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:214:9: warning[-Wanalyzer-null-argument]: use of NULL ‘copy’ where non-null expected
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  212|   
#  213|   	// Second scan to extract values and validate
#  214|-> 	strcpy(copy, str);
#  215|   	p = strtok(copy, sep);
#  216|   	i = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:332:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:461:16: enter_function: entry to ‘parse_toml_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:480:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:485:15: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:486:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:486:12: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:497:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:500:23: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:500:23: call_function: calling ‘parse_toml_protocol’ from ‘parse_toml_keymap’
#  330|   	*keymap = map;
#  331|   
#  332|-> 	raw = toml_raw_in(proot, "protocol");
#  333|   	if (!raw) {
#  334|   		fprintf(stderr, _("%s: protocol missing\n"), fname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:339:13: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  337|   	}
#  338|   
#  339|-> 	if (toml_rtos(raw, &p)) {
#  340|   		fprintf(stderr, _("%s: bad value `%s' for protocol\n"), fname, raw);
#  341|   		free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:349:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  347|   		have_raw_protocol = true;
#  348|   
#  349|-> 	raw = toml_raw_in(proot, "variant");
#  350|   	if (raw) {
#  351|   		if (toml_rtos(raw, &p)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:351:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  349|   	raw = toml_raw_in(proot, "variant");
#  350|   	if (raw) {
#  351|-> 		if (toml_rtos(raw, &p)) {
#  352|   			fprintf(stderr, _("%s: bad value `%s' for variant\n"), fname, raw);
#  353|   			free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:360:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  358|   	}
#  359|   
#  360|-> 	raw = toml_raw_in(proot, "name");
#  361|   	if (raw) {
#  362|   		if (toml_rtos(raw, &p)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:362:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  360|   	raw = toml_raw_in(proot, "name");
#  361|   	if (raw) {
#  362|-> 		if (toml_rtos(raw, &p)) {
#  363|   			fprintf(stderr, _("%s: bad value `%s' for name\n"), fname, raw);
#  364|   			free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def296]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:402:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘param’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  400|   
#  401|   			param = malloc(sizeof(*param));
#  402|-> 			param->name = strdup(key);
#  403|   			param->value = value;
#  404|   			param->next = map->param;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def297]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:472:15: acquire_resource: opened here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: throw: if ‘toml_parse_file’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  476|   	}
#  477|   
#  478|-> 	root = toml_parse_file(fin, buf, sizeof(buf));
#  479|   	fclose(fin);
#  480|   	if (!root) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:472:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: throw: if ‘toml_parse_file’ throws an exception...
v4l-utils-1.32.0/utils/ir-ctl/keymap.c:478:16: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  476|   	}
#  477|   
#  478|-> 	root = toml_parse_file(fin, buf, sizeof(buf));
#  479|   	fclose(fin);
#  480|   	if (!root) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
v4l-utils-1.32.0/utils/keytable/bpf_load.c:147:21: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
v4l-utils-1.32.0/utils/keytable/bpf_load.c:121:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:127:13: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:127:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:128:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:133:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:135:23: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:136:31: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:137:29: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:137:29: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:144:24: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:147:21: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:147:21: throw: if ‘bpf_map_update_elem’ throws an exception...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:147:21: danger: ‘p’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  145|   			p->raw[i++] = 0;
#  146|   
#  147|-> 		if (bpf_map_update_elem(fd, &key, p, BPF_ANY)) {
#  148|   			printf(_("failed to update raw map: %d %s\n"),
#  149|   			       errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
v4l-utils-1.32.0/utils/keytable/bpf_load.c:366:22: warning[-Wanalyzer-malloc-leak]: leak of ‘sym’
v4l-utils-1.32.0/utils/keytable/bpf_load.c:347:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:14: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:353:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:354:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:355:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:356:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:364:34: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:365:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:365:17: branch_true: following ‘true’ branch (when ‘nr_maps != 33’)...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:366:60: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:366:22: throw: if ‘gelf_getsym’ throws an exception...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:366:22: danger: ‘sym’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  364|   	for (i = 0, nr_maps = 0; i < bpf_file->symbols->d_size / sizeof(GElf_Sym); i++) {
#  365|   		assert(nr_maps < MAX_MAPS+1);
#  366|-> 		if (!gelf_getsym(bpf_file->symbols, i, &sym[nr_maps]))
#  367|   			continue;
#  368|   		if (sym[nr_maps].st_shndx != bpf_file->maps_shidx)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sym’
v4l-utils-1.32.0/utils/keytable/bpf_load.c:347:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:14: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:353:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:354:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:355:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:356:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:364:34: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: throw: if ‘qsort’ throws an exception...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: danger: ‘sym’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  373|   
#  374|   	/* Align to map_fd[] order, via sort on offset in sym.st_value */
#  375|-> 	qsort(sym, nr_maps, sizeof(GElf_Sym), cmp_symbols);
#  376|   
#  377|   	/* Keeping compatible with ELF maps section changes

Error: GCC_ANALYZER_WARNING (CWE-688): [#def302]
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘sym’ where non-null expected
v4l-utils-1.32.0/utils/keytable/bpf_load.c:347:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:14: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:349:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:353:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:354:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:355:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:356:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:363:15: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/bpf_load.c:364:34: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/bpf_load.c:375:9: danger: argument 1 (‘sym’) from [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#  373|   
#  374|   	/* Align to map_fd[] order, via sort on offset in sym.st_value */
#  375|-> 	qsort(sym, nr_maps, sizeof(GElf_Sym), cmp_symbols);
#  376|   
#  377|   	/* Keeping compatible with ELF maps section changes

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
v4l-utils-1.32.0/utils/keytable/keymap.c:104:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  102|   		while (*p == ' ' || *p == '\t')
#  103|   			p++;
#  104|-> 		if (line_no==1 && p[0] == '#') {
#  105|   			p++;
#  106|   			p = strtok(p, "\n\t =:");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
v4l-utils-1.32.0/utils/keytable/keymap.c:104:21: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  102|   		while (*p == ' ' || *p == '\t')
#  103|   			p++;
#  104|-> 		if (line_no==1 && p[0] == '#') {
#  105|   			p++;
#  106|   			p = strtok(p, "\n\t =:");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def305]
v4l-utils-1.32.0/utils/keytable/keymap.c:127:57: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘k’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  125|   
#  126|   							k = calloc(1, sizeof(*k));
#  127|-> 							k->protocol = strdup(p);
#  128|   							k->next = map->next;
#  129|   							map->next = k;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
v4l-utils-1.32.0/utils/keytable/keymap.c:188:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:533:16: call_function: calling ‘parse_plain_keymap’ from ‘parse_keymap’
#  186|   		line_no, fname);
#  187|   	return EINVAL;
#  188|-> }
#  189|   
#  190|   static error_t parse_rawir_string(const char *fname, char *str, struct raw_entry **entry)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def307]
v4l-utils-1.32.0/utils/keytable/keymap.c:214:9: warning[-Wanalyzer-null-argument]: use of NULL ‘copy’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  212|   
#  213|   	// Second scan to extract values and validate
#  214|-> 	strcpy(copy, str);
#  215|   	p = strtok(copy, sep);
#  216|   	i = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
v4l-utils-1.32.0/utils/keytable/keymap.c:332:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:461:16: enter_function: entry to ‘parse_toml_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:480:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:485:15: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:486:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:486:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:497:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:500:23: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:500:23: call_function: calling ‘parse_toml_protocol’ from ‘parse_toml_keymap’
#  330|   	*keymap = map;
#  331|   
#  332|-> 	raw = toml_raw_in(proot, "protocol");
#  333|   	if (!raw) {
#  334|   		fprintf(stderr, _("%s: protocol missing\n"), fname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
v4l-utils-1.32.0/utils/keytable/keymap.c:339:13: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  337|   	}
#  338|   
#  339|-> 	if (toml_rtos(raw, &p)) {
#  340|   		fprintf(stderr, _("%s: bad value `%s' for protocol\n"), fname, raw);
#  341|   		free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
v4l-utils-1.32.0/utils/keytable/keymap.c:349:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  347|   		have_raw_protocol = true;
#  348|   
#  349|-> 	raw = toml_raw_in(proot, "variant");
#  350|   	if (raw) {
#  351|   		if (toml_rtos(raw, &p)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
v4l-utils-1.32.0/utils/keytable/keymap.c:351:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  349|   	raw = toml_raw_in(proot, "variant");
#  350|   	if (raw) {
#  351|-> 		if (toml_rtos(raw, &p)) {
#  352|   			fprintf(stderr, _("%s: bad value `%s' for variant\n"), fname, raw);
#  353|   			free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
v4l-utils-1.32.0/utils/keytable/keymap.c:360:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  358|   	}
#  359|   
#  360|-> 	raw = toml_raw_in(proot, "name");
#  361|   	if (raw) {
#  362|   		if (toml_rtos(raw, &p)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
v4l-utils-1.32.0/utils/keytable/keymap.c:362:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_map’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  360|   	raw = toml_raw_in(proot, "name");
#  361|   	if (raw) {
#  362|-> 		if (toml_rtos(raw, &p)) {
#  363|   			fprintf(stderr, _("%s: bad value `%s' for name\n"), fname, raw);
#  364|   			free_keymap(map);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def314]
v4l-utils-1.32.0/utils/keytable/keymap.c:402:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘param’
v4l-utils-1.32.0/utils/keytable/keymap.c:526:9: enter_function: entry to ‘parse_keymap’
v4l-utils-1.32.0/utils/keytable/keymap.c:530:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:531:24: call_function: calling ‘parse_toml_keymap’ from ‘parse_keymap’
#  400|   
#  401|   			param = malloc(sizeof(*param));
#  402|-> 			param->name = strdup(key);
#  403|   			param->value = value;
#  404|   			param->next = map->param;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def315]
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
v4l-utils-1.32.0/utils/keytable/keymap.c:472:15: acquire_resource: opened here
v4l-utils-1.32.0/utils/keytable/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: throw: if ‘toml_parse_file’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  476|   	}
#  477|   
#  478|-> 	root = toml_parse_file(fin, buf, sizeof(buf));
#  479|   	fclose(fin);
#  480|   	if (!root) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
v4l-utils-1.32.0/utils/keytable/keymap.c:472:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keymap.c:473:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: throw: if ‘toml_parse_file’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keymap.c:478:16: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  476|   	}
#  477|   
#  478|-> 	root = toml_parse_file(fin, buf, sizeof(buf));
#  479|   	fclose(fin);
#  480|   	if (!root) {

Error: CPPCHECK_WARNING (CWE-476): [#def317]
v4l-utils-1.32.0/utils/keytable/keytable.c:360: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  358|   
#  359|   	for (a = bpf_protocol; a; a = a->next) {
#  360|-> 		if (strcmp(a->name, new->name))
#  361|   			continue;
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def318]
v4l-utils-1.32.0/utils/keytable/keytable.c:360:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*a.name’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:372:12: enter_function: entry to ‘add_keymap’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:386:43: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: call_function: calling ‘add_bpf_protocol’ from ‘add_keymap’
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: return_function: possible return of NULL to ‘add_keymap’ from ‘add_bpf_protocol’
v4l-utils-1.32.0/utils/keytable/keytable.c:396:42: branch_false: following ‘false’ branch (when ‘se’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:420:22: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:420:37: branch_false: following ‘false’ branch (when ‘re’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:451:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: call_function: calling ‘add_bpf_protocol’ from ‘add_keymap’
#  358|   
#  359|   	for (a = bpf_protocol; a; a = a->next) {
#  360|-> 		if (strcmp(a->name, new->name))
#  361|   			continue;
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def319]
v4l-utils-1.32.0/utils/keytable/keytable.c:360:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*new.name’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:372:12: enter_function: entry to ‘add_keymap’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:386:43: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: call_function: calling ‘add_bpf_protocol’ from ‘add_keymap’
#  358|   
#  359|   	for (a = bpf_protocol; a; a = a->next) {
#  360|-> 		if (strcmp(a->name, new->name))
#  361|   			continue;
#  362|   

Error: CPPCHECK_WARNING (CWE-476): [#def320]
v4l-utils-1.32.0/utils/keytable/keytable.c:363: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  361|   			continue;
#  362|   
#  363|-> 		if (compare_parameters(a->param, new->param) &&
#  364|   		    compare_parameters(new->param, a->param))
#  365|   			return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
v4l-utils-1.32.0/utils/keytable/keytable.c:370:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:372:12: enter_function: entry to ‘add_keymap’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: call_function: calling ‘add_bpf_protocol’ from ‘add_keymap’
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: return_function: returning to ‘add_keymap’ from ‘add_bpf_protocol’
v4l-utils-1.32.0/utils/keytable/keytable.c:396:42: branch_false: following ‘false’ branch (when ‘se’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:420:22: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:420:37: branch_false: following ‘false’ branch (when ‘re’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:451:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:386:43: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:390:33: call_function: calling ‘add_bpf_protocol’ from ‘add_keymap’
#  368|   	new->next = bpf_protocol;
#  369|   	bpf_protocol = new;
#  370|-> }
#  371|   
#  372|   static int add_keymap(struct keymap *map, const char *fname)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: warning[-Wanalyzer-malloc-leak]: leak of ‘b’
v4l-utils-1.32.0/utils/keytable/keytable.c:532:16: enter_function: entry to ‘parse_opt’
v4l-utils-1.32.0/utils/keytable/keytable.c:568:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:572:24: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:575:17: call_function: calling ‘add_keymap’ from ‘parse_opt’
#  383|   				struct bpf_protocol *b;
#  384|   
#  385|-> 				b = malloc(sizeof(*b));
#  386|   				b->name = strdup(map->protocol);
#  387|   				b->param = map->param;

Error: CPPCHECK_WARNING (CWE-476): [#def323]
v4l-utils-1.32.0/utils/keytable/keytable.c:386: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  384|   
#  385|   				b = malloc(sizeof(*b));
#  386|-> 				b->name = strdup(map->protocol);
#  387|   				b->param = map->param;
#  388|   				/* steal param */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def324]
v4l-utils-1.32.0/utils/keytable/keytable.c:386:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘b’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:381:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:382:29: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:382:28: branch_true: following ‘true’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:385:37: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:386:33: danger: ‘b’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  384|   
#  385|   				b = malloc(sizeof(*b));
#  386|-> 				b->name = strdup(map->protocol);
#  387|   				b->param = map->param;
#  388|   				/* steal param */

Error: CPPCHECK_WARNING (CWE-476): [#def325]
v4l-utils-1.32.0/utils/keytable/keytable.c:387: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  385|   				b = malloc(sizeof(*b));
#  386|   				b->name = strdup(map->protocol);
#  387|-> 				b->param = map->param;
#  388|   				/* steal param */
#  389|   				map->param = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def326]
v4l-utils-1.32.0/utils/keytable/keytable.c:413: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  411|   
#  412|   			ke = malloc(sizeof(*ke));
#  413|-> 			ke->scancode = se->scancode;
#  414|   			ke->keycode = value;
#  415|   			ke->next = keytable;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def327]
v4l-utils-1.32.0/utils/keytable/keytable.c:413:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ke’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:396:42: branch_true: following ‘true’ branch (when ‘se’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:400:44: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:404:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:412:30: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:412:30: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:413:25: danger: ‘ke’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  411|   
#  412|   			ke = malloc(sizeof(*ke));
#  413|-> 			ke->scancode = se->scancode;
#  414|   			ke->keycode = value;
#  415|   			ke->next = keytable;

Error: CPPCHECK_WARNING (CWE-476): [#def328]
v4l-utils-1.32.0/utils/keytable/keytable.c:414: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  412|   			ke = malloc(sizeof(*ke));
#  413|   			ke->scancode = se->scancode;
#  414|-> 			ke->keycode = value;
#  415|   			ke->next = keytable;
#  416|   

Error: CPPCHECK_WARNING (CWE-476): [#def329]
v4l-utils-1.32.0/utils/keytable/keytable.c:415: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  413|   			ke->scancode = se->scancode;
#  414|   			ke->keycode = value;
#  415|-> 			ke->next = keytable;
#  416|   
#  417|   			keytable = ke;

Error: CPPCHECK_WARNING (CWE-476): [#def330]
v4l-utils-1.32.0/utils/keytable/keytable.c:439: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  437|   
#  438|   			ke = malloc(sizeof(*ke));
#  439|-> 			ke->scancode = raw_scancode;
#  440|   			ke->keycode = value;
#  441|   			ke->next = keytable;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def331]
v4l-utils-1.32.0/utils/keytable/keytable.c:439:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ke’
v4l-utils-1.32.0/utils/keytable/keytable.c:374:16: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:380:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:396:42: branch_false: following ‘false’ branch (when ‘se’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:420:22: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:420:37: branch_true: following ‘true’ branch (when ‘re’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:424:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:430:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:438:30: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:438:30: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:439:25: danger: ‘ke’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  437|   
#  438|   			ke = malloc(sizeof(*ke));
#  439|-> 			ke->scancode = raw_scancode;
#  440|   			ke->keycode = value;
#  441|   			ke->next = keytable;

Error: CPPCHECK_WARNING (CWE-476): [#def332]
v4l-utils-1.32.0/utils/keytable/keytable.c:440: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  438|   			ke = malloc(sizeof(*ke));
#  439|   			ke->scancode = raw_scancode;
#  440|-> 			ke->keycode = value;
#  441|   			ke->next = keytable;
#  442|   

Error: CPPCHECK_WARNING (CWE-476): [#def333]
v4l-utils-1.32.0/utils/keytable/keytable.c:441: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ke
#  439|   			ke->scancode = raw_scancode;
#  440|   			ke->keycode = value;
#  441|-> 			ke->next = keytable;
#  442|   
#  443|   			keytable = ke;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def334]
v4l-utils-1.32.0/utils/keytable/keytable.c:501:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfg.driver’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:474:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:475:23: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:485:20: branch_false: following ‘false’ branch (when ‘driver’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:488:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:489:20: branch_false: following ‘false’ branch (when ‘table’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:492:28: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:493:20: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:496:21: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:500:35: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:501:17: danger: argument 1 (‘malloc(strlen(driver) + 1)’) from [(14)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/13) could be NULL where non-null expected
#  499|   
#  500|   		nextcfg->driver = malloc(strlen(driver) + 1);
#  501|-> 		strcpy(nextcfg->driver, driver);
#  502|   
#  503|   		nextcfg->table = malloc(strlen(table) + 1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def335]
v4l-utils-1.32.0/utils/keytable/keytable.c:504:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfg.table’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:474:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:475:23: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:485:20: branch_false: following ‘false’ branch (when ‘driver’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:488:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:489:20: branch_false: following ‘false’ branch (when ‘table’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:492:28: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:493:20: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:496:21: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:503:34: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:504:17: danger: argument 1 (‘malloc(strlen(table) + 1)’) from [(14)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/13) could be NULL where non-null expected
#  502|   
#  503|   		nextcfg->table = malloc(strlen(table) + 1);
#  504|-> 		strcpy(nextcfg->table, table);
#  505|   
#  506|   		nextcfg->fname = malloc(strlen(filename) + 1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def336]
v4l-utils-1.32.0/utils/keytable/keytable.c:507:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfg.fname’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:469:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:474:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:475:23: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:485:20: branch_false: following ‘false’ branch (when ‘driver’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:488:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:489:20: branch_false: following ‘false’ branch (when ‘table’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:492:28: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:493:20: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:496:21: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:506:34: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:507:17: danger: argument 1 (‘malloc(strlen(filename) + 1)’) from [(14)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/13) could be NULL where non-null expected
#  505|   
#  506|   		nextcfg->fname = malloc(strlen(filename) + 1);
#  507|-> 		strcpy(nextcfg->fname, filename);
#  508|   
#  509|   		nextcfg->next = calloc(1, sizeof(*nextcfg));

Error: CPPCHECK_WARNING (CWE-476): [#def337]
v4l-utils-1.32.0/utils/keytable/keytable.c:646: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  644|   
#  645|   				b = malloc(sizeof(*b));
#  646|-> 				b->name = strdup(p);
#  647|   				b->param = NULL;
#  648|   				b->next = bpf_protocol;

Error: CPPCHECK_WARNING (CWE-476): [#def338]
v4l-utils-1.32.0/utils/keytable/keytable.c:647: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  645|   				b = malloc(sizeof(*b));
#  646|   				b->name = strdup(p);
#  647|-> 				b->param = NULL;
#  648|   				b->next = bpf_protocol;
#  649|   				bpf_protocol = b;

Error: CPPCHECK_WARNING (CWE-476): [#def339]
v4l-utils-1.32.0/utils/keytable/keytable.c:648: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  646|   				b->name = strdup(p);
#  647|   				b->param = NULL;
#  648|-> 				b->next = bpf_protocol;
#  649|   				bpf_protocol = b;
#  650|   			}

Error: CPPCHECK_WARNING (CWE-476): [#def340]
v4l-utils-1.32.0/utils/keytable/keytable.c:672: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: param
#  670|   			}
#  671|   
#  672|-> 			param->name = strdup(p);
#  673|   
#  674|   			p = strtok(NULL, ",;");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def341]
v4l-utils-1.32.0/utils/keytable/keytable.c:672:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘param’
v4l-utils-1.32.0/utils/keytable/keytable.c:661:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:666:33: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:666:33: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:672:25: danger: ‘param’ could be NULL: unchecked value from [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
#  670|   			}
#  671|   
#  672|-> 			param->name = strdup(p);
#  673|   
#  674|   			p = strtok(NULL, ",;");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
v4l-utils-1.32.0/utils/keytable/keytable.c:676:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:661:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:666:33: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:672:39: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:675:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:676:33: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:676:33: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
#  674|   			p = strtok(NULL, ",;");
#  675|   			if (!p) {
#  676|-> 				free(param);
#  677|   				argp_error(state, _("Missing value"));
#  678|   				break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
v4l-utils-1.32.0/utils/keytable/keytable.c:763:15: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:763:15: throw: if ‘opendir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:763:15: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  761|   	cur_name = names;
#  762|   
#  763|-> 	dir = opendir(dname);
#  764|   	if (!dir) {
#  765|   		perror(dname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
v4l-utils-1.32.0/utils/keytable/keytable.c:765:17: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:765:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:765:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:765:17: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  763|   	dir = opendir(dname);
#  764|   	if (!dir) {
#  765|-> 		perror(dname);
#  766|   		return NULL;
#  767|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  766|   		return NULL;
#  767|   	}
#  768|-> 	entry = readdir(dir);
#  769|   	while (entry) {
#  770|   		if (!node_name || !strncmp(entry->d_name, node_name, strlen(node_name))) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dname)’
v4l-utils-1.32.0/utils/keytable/keytable.c:763:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: danger: ‘opendir(dname)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  766|   		return NULL;
#  767|   	}
#  768|-> 	entry = readdir(dir);
#  769|   	while (entry) {
#  770|   		if (!node_name || !strncmp(entry->d_name, node_name, strlen(node_name))) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def347]
v4l-utils-1.32.0/utils/keytable/keytable.c:771:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘cur_name’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: following ‘true’ branch (when ‘node_name’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:771:25: danger: ‘cur_name’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  769|   	while (entry) {
#  770|   		if (!node_name || !strncmp(entry->d_name, node_name, strlen(node_name))) {
#  771|-> 			cur_name->name = malloc(strlen(dname) + strlen(entry->d_name) + 2);
#  772|   			if (!cur_name->name)
#  773|   				goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:771:42: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
#  781|   			cur_name = cur_name->next;
#  782|   		}
#  783|-> 		entry = readdir(dir);
#  784|   	}
#  785|   	closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_name’
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:778:42: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: danger: ‘cur_name’ leaks here; was allocated at [(13)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/12)
#  781|   			cur_name = cur_name->next;
#  782|   		}
#  783|-> 		entry = readdir(dir);
#  784|   	}
#  785|   	closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  781|   			cur_name = cur_name->next;
#  782|   		}
#  783|-> 		entry = readdir(dir);
#  784|   	}
#  785|   	closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:771:42: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_false: following ‘false’ branch (when ‘entry’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: throw: if ‘closedir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
#  783|   		entry = readdir(dir);
#  784|   	}
#  785|-> 	closedir(dir);
#  786|   
#  787|   	if (names == cur_name) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_name’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_false: following ‘false’ branch (when ‘entry’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: throw: if ‘closedir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: danger: ‘cur_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  783|   		entry = readdir(dir);
#  784|   	}
#  785|-> 	closedir(dir);
#  786|   
#  787|   	if (names == cur_name) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_false: following ‘false’ branch (when ‘entry’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: throw: if ‘closedir’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:785:9: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  783|   		entry = readdir(dir);
#  784|   	}
#  785|-> 	closedir(dir);
#  786|   
#  787|   	if (names == cur_name) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:771:42: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_false: following ‘false’ branch (when ‘node_name’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:778:42: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:780:33: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  796|   
#  797|   err:
#  798|-> 	perror(_("Seek dir"));
#  799|   	free_names(names);
#  800|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cur_name’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: following ‘true’ branch (when ‘node_name’ is NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:773:33: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: danger: ‘cur_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  796|   
#  797|   err:
#  798|-> 	perror(_("Seek dir"));
#  799|   	free_names(names);
#  800|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:768:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:774:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:776:28: branch_true: following ‘true’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:777:40: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:779:28: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:783:25: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:769:16: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:20: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:770:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:770:21: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:771:49: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:772:28: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:773:33: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:798:9: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  796|   
#  797|   err:
#  798|-> 	perror(_("Seek dir"));
#  799|   	free_names(names);
#  800|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
v4l-utils-1.32.0/utils/keytable/keytable.c:801:1: warning[-Wanalyzer-malloc-leak]: leak of ‘names’
v4l-utils-1.32.0/utils/keytable/keytable.c:759:17: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:764:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:765:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:801:1: danger: ‘names’ leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  799|   	free_names(names);
#  800|   	return NULL;
#  801|-> }
#  802|   
#  803|   static void free_uevent(struct uevents *uevent)

Error: CPPCHECK_WARNING (CWE-476): [#def358]
v4l-utils-1.32.0/utils/keytable/keytable.c:827: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file
#  825|   
#  826|   	file = malloc(strlen(dname) + strlen(event) + 1);
#  827|-> 	strcpy(file, dname);
#  828|   	strcat(file, event);
#  829|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def359]
v4l-utils-1.32.0/utils/keytable/keytable.c:827:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file’ where non-null expected
v4l-utils-1.32.0/utils/keytable/keytable.c:826:16: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:827:9: danger: argument 1 (‘file’) from [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  825|   
#  826|   	file = malloc(strlen(dname) + strlen(event) + 1);
#  827|-> 	strcpy(file, dname);
#  828|   	strcat(file, event);
#  829|   

Error: CPPCHECK_WARNING (CWE-476): [#def360]
v4l-utils-1.32.0/utils/keytable/keytable.c:828: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file
#  826|   	file = malloc(strlen(dname) + strlen(event) + 1);
#  827|   	strcpy(file, dname);
#  828|-> 	strcat(file, event);
#  829|   
#  830|   	if (debug)

Error: CPPCHECK_WARNING (CWE-476): [#def361]
v4l-utils-1.32.0/utils/keytable/keytable.c:834: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file
#  832|   
#  833|   
#  834|-> 	fp = fopen(file, "r");
#  835|   	if (!fp) {
#  836|   		perror(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
v4l-utils-1.32.0/utils/keytable/keytable.c:826:16: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: danger: ‘file’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  834|   	fp = fopen(file, "r");
#  835|   	if (!fp) {
#  836|-> 		perror(file);
#  837|   		free(file);
#  838|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: warning[-Wanalyzer-malloc-leak]: leak of ‘uevent’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: danger: ‘uevent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#  834|   	fp = fopen(file, "r");
#  835|   	if (!fp) {
#  836|-> 		perror(file);
#  837|   		free(file);
#  838|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def364]
v4l-utils-1.32.0/utils/keytable/keytable.c:844:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘next’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:844:17: danger: ‘next’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  842|   		if (!p)
#  843|   			continue;
#  844|-> 		next->key = malloc(strlen(p) + 1);
#  845|   		if (!next->key) {
#  846|   			perror("next->key");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
v4l-utils-1.32.0/utils/keytable/keytable.c:826:16: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: danger: ‘file’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  844|   		next->key = malloc(strlen(p) + 1);
#  845|   		if (!next->key) {
#  846|-> 			perror("next->key");
#  847|   			fclose(fp);
#  848|   			free(line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: warning[-Wanalyzer-malloc-leak]: leak of ‘next’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:846:25: danger: ‘next’ leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
#  844|   		next->key = malloc(strlen(p) + 1);
#  845|   		if (!next->key) {
#  846|-> 			perror("next->key");
#  847|   			fclose(fp);
#  848|   			free(line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:844:29: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/7)
#  864|   		next->value = malloc(strlen(p) + 1);
#  865|   		if (!next->value) {
#  866|-> 			perror("next->value");
#  867|   			fclose(fp);
#  868|   			free(line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
v4l-utils-1.32.0/utils/keytable/keytable.c:826:16: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: danger: ‘file’ leaks here; was allocated at [(1)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/0)
#  864|   		next->value = malloc(strlen(p) + 1);
#  865|   		if (!next->value) {
#  866|-> 			perror("next->value");
#  867|   			fclose(fp);
#  868|   			free(line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: warning[-Wanalyzer-malloc-leak]: leak of ‘next’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:866:25: danger: ‘next’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  864|   		next->value = malloc(strlen(p) + 1);
#  865|   		if (!next->value) {
#  866|-> 			perror("next->value");
#  867|   			fclose(fp);
#  868|   			free(line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:844:29: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:873:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:879:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/7)
#  878|   		next->next = calloc(1, sizeof(*next));
#  879|   		if (!next->next) {
#  880|-> 			perror("next->next");
#  881|   			fclose(fp);
#  882|   			free(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
v4l-utils-1.32.0/utils/keytable/keytable.c:826:16: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:873:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:879:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: danger: ‘file’ leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
#  878|   		next->next = calloc(1, sizeof(*next));
#  879|   		if (!next->next) {
#  880|-> 			perror("next->next");
#  881|   			fclose(fp);
#  882|   			free(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: warning[-Wanalyzer-malloc-leak]: leak of ‘next’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:840:16: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:841:27: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:842:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:844:36: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:845:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:853:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:856:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
v4l-utils-1.32.0/utils/keytable/keytable.c:864:38: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:865:20: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:873:17: branch_false: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:879:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: throw: if ‘perror’ throws an exception...
v4l-utils-1.32.0/utils/keytable/keytable.c:880:25: danger: ‘next’ leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
#  878|   		next->next = calloc(1, sizeof(*next));
#  879|   		if (!next->next) {
#  880|-> 			perror("next->next");
#  881|   			fclose(fp);
#  882|   			free(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
v4l-utils-1.32.0/utils/keytable/keytable.c:894:1: warning[-Wanalyzer-malloc-leak]: leak of ‘uevent’
v4l-utils-1.32.0/utils/keytable/keytable.c:824:25: acquire_memory: allocated here
v4l-utils-1.32.0/utils/keytable/keytable.c:835:12: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:836:17: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:894:1: danger: ‘uevent’ leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
#  892|   
#  893|   	return uevent;
#  894|-> }
#  895|   
#  896|   static struct sysfs_names *find_device(char *name)

Error: CPPCHECK_WARNING (CWE-476): [#def374]
v4l-utils-1.32.0/utils/keytable/keytable.c:924: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
#  922|   
#  923|   		n = malloc(strlen(name) + 2);
#  924|-> 		strcpy(n, name);
#  925|   		strcat(n,"/");
#  926|   		for (cur = names; cur->next; cur = cur->next) {

Error: CPPCHECK_WARNING (CWE-476): [#def375]
v4l-utils-1.32.0/utils/keytable/keytable.c:925: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
#  923|   		n = malloc(strlen(name) + 2);
#  924|   		strcpy(n, name);
#  925|-> 		strcat(n,"/");
#  926|   		for (cur = names; cur->next; cur = cur->next) {
#  927|   			if (cur->name) {

Error: CPPCHECK_WARNING (CWE-476): [#def376]
v4l-utils-1.32.0/utils/keytable/keytable.c:942: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp
#  940|   		}
#  941|   		tmp = calloc(sizeof(*names), 1);
#  942|-> 		tmp->name = cur->name;
#  943|   		cur->name = NULL;
#  944|   		free_names(names);

Error: CPPCHECK_WARNING (CWE-476): [#def377]
v4l-utils-1.32.0/utils/keytable/keytable.c:971: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  969|   
#  970|   		b = malloc(sizeof(*b));
#  971|-> 		b->name = strdup(pme->name);
#  972|   		b->param = NULL;
#  973|   		add_bpf_protocol(b);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def378]
v4l-utils-1.32.0/utils/keytable/keytable.c:971:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘b’
v4l-utils-1.32.0/utils/keytable/keytable.c:960:34: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:963:21: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:963:20: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:963:20: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:960:34: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:963:21: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:960:34: branch_true: following ‘true’ branch...
v4l-utils-1.32.0/utils/keytable/keytable.c:963:21: branch_true: ...to here
v4l-utils-1.32.0/utils/keytable/keytable.c:970:21: acquire_memory: this call could return NULL
v4l-utils-1.32.0/utils/keytable/keytable.c:971:17: danger: ‘b’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/8)
#  969|   
#  970|   		b = malloc(sizeof(*b));
#  971|-> 		b->name = strdup(pme->name);
#  972|   		b->param = NULL;
#  973|   		add_bpf_protocol(b);

Error: CPPCHECK_WARNING (CWE-476): [#def379]
v4l-utils-1.32.0/utils/keytable/keytable.c:972: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#  970|   		b = malloc(sizeof(*b));
#  971|   		b->name = strdup(pme->name);
#  972|-> 		b->param = NULL;
#  973|   		add_bpf_protocol(b);
#  974|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def380]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&file, "r")’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:101:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:104:9: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:105:13: acquire_resource: opened here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:106:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:14: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:12: danger: ‘fopen(&file, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  106|   	if (!f)
#  107|   		return MEDIA_BUS_UNKNOWN;
#  108|-> 	if (!fgets(s, sizeof(s), f))
#  109|   		return MEDIA_BUS_UNKNOWN;
#  110|   	fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&file, "r")’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:101:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:104:9: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:105:13: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:106:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:14: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:108:12: danger: ‘fopen(&file, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  106|   	if (!f)
#  107|   		return MEDIA_BUS_UNKNOWN;
#  108|-> 	if (!fgets(s, sizeof(s), f))
#  109|   		return MEDIA_BUS_UNKNOWN;
#  110|   	fclose(f);

Error: CPPCHECK_WARNING (CWE-404): [#def382]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:109: error[resourceLeak]: Resource leak: f
#  107|   		return MEDIA_BUS_UNKNOWN;
#  108|   	if (!fgets(s, sizeof(s), f))
#  109|-> 		return MEDIA_BUS_UNKNOWN;
#  110|   	fclose(f);
#  111|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:138:15: warning[-Wanalyzer-malloc-leak]: leak of ‘md’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:336:7: enter_function: entry to ‘discover_media_devices’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:341:14: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:342:12: branch_false: following ‘false’ branch (when ‘md’ is non-NULL)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: call_function: calling ‘get_class’ from ‘discover_media_devices’
#  136|   
#  137|   	snprintf(dname, PATH_MAX, "/sys/class/%s", class);
#  138|-> 	dir = opendir(dname);
#  139|   	if (!dir) {
#  140|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:22: warning[-Wanalyzer-malloc-leak]: leak of ‘md’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:336:7: enter_function: entry to ‘discover_media_devices’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:341:14: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:342:12: branch_false: following ‘false’ branch (when ‘md’ is non-NULL)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: call_function: calling ‘get_class’ from ‘discover_media_devices’
#  140|   		return 0;
#  141|   	}
#  142|-> 	for (entry = readdir(dir); entry; entry = readdir(dir)) {
#  143|   		/* Skip . and .. */
#  144|   		if (entry->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dname)’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:138:15: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:139:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:22: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:22: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:22: danger: ‘opendir(&dname)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  140|   		return 0;
#  141|   	}
#  142|-> 	for (entry = readdir(dir); entry; entry = readdir(dir)) {
#  143|   		/* Skip . and .. */
#  144|   		if (entry->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:142:51: warning[-Wanalyzer-malloc-leak]: leak of ‘md’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:336:7: enter_function: entry to ‘discover_media_devices’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:341:14: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:342:12: branch_false: following ‘false’ branch (when ‘md’ is non-NULL)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: call_function: calling ‘get_class’ from ‘discover_media_devices’
#  140|   		return 0;
#  141|   	}
#  142|-> 	for (entry = readdir(dir); entry; entry = readdir(dir)) {
#  143|   		/* Skip . and .. */
#  144|   		if (entry->d_name[0] == '.')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:213:9: warning[-Wanalyzer-malloc-leak]: leak of ‘md’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:336:7: enter_function: entry to ‘discover_media_devices’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:341:14: acquire_memory: allocated here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:342:12: branch_false: following ‘false’ branch (when ‘md’ is non-NULL)...
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: branch_false: ...to here
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:346:13: call_function: calling ‘get_class’ from ‘discover_media_devices’
#  211|   	err = 0;
#  212|   error:
#  213|-> 	closedir(dir);
#  214|   	return err;
#  215|   }

Error: COMPILER_WARNING (CWE-704): [#def388]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c: scope_hint: In function ‘get_associated_device’
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:459:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  459 |                 p = strrchr(seek_device, '/');
#      |                   ^
#  457|   	if (seek_type != NONE && seek_device[0]) {
#  458|   		/* Get just the device name */
#  459|-> 		p = strrchr(seek_device, '/');
#  460|   		if (p)
#  461|   			seek_device = p + 1;

Error: COMPILER_WARNING (CWE-704): [#def389]
v4l-utils-1.32.0/utils/libmedia_dev/get_media_devices.c:459:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  457|   	if (seek_type != NONE && seek_device[0]) {
#  458|   		/* Get just the device name */
#  459|-> 		p = strrchr(seek_device, '/');
#  460|   		if (p)
#  461|   			seek_device = p + 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
v4l-utils-1.32.0/utils/media-ctl/options.c:220:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev")’
v4l-utils-1.32.0/utils/media-ctl/options.c:208:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/media-ctl/options.c:211:13: branch_false: ...to here
v4l-utils-1.32.0/utils/media-ctl/options.c:216:14: acquire_memory: allocated here
v4l-utils-1.32.0/utils/media-ctl/options.c:217:12: branch_false: following ‘false’ branch...
v4l-utils-1.32.0/utils/media-ctl/options.c:217:12: branch_false: ...to here
v4l-utils-1.32.0/utils/media-ctl/options.c:220:22: throw: if ‘readdir’ throws an exception...
v4l-utils-1.32.0/utils/media-ctl/options.c:220:22: danger: ‘opendir("/dev")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  218|   		return device;
#  219|   
#  220|-> 	while ((ep = readdir(dp))) {
#  221|   		const char *name = ep->d_name;
#  222|   

Error: CPPCHECK_WARNING (CWE-401): [#def391]
v4l-utils-1.32.0/utils/qv4l2/alsa_stream.c:635: error[memleak]: Memory leak: inputs.cdevice
#  633|           alsa_is_running = 1;
#  634|   
#  635|->     return ret;
#  636|   }
#  637|   

Error: CPPCHECK_WARNING (CWE-401): [#def392]
v4l-utils-1.32.0/utils/qv4l2/alsa_stream.c:635: error[memleak]: Memory leak: inputs.pdevice
#  633|           alsa_is_running = 1;
#  634|   
#  635|->     return ret;
#  636|   }
#  637|   

Error: COMPILER_WARNING (CWE-252): [#def393]
v4l-utils-1.32.0/utils/qv4l2/qv4l2.cpp: scope_hint: In member function ‘void SaveDialog::selected(const QString&)’
v4l-utils-1.32.0/utils/qv4l2/qv4l2.cpp:1673:26: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’
# 1673 |                 file.open(QIODevice::WriteOnly | QIODevice::Truncate);
#      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qdir.h:11: included_from: Included from here.
/usr/include/qt6/QtWidgets/qfiledialog.h:9: included_from: Included from here.
/usr/include/qt6/QtWidgets/QFileDialog:1: included_from: Included from here.
v4l-utils-1.32.0/utils/qv4l2/qv4l2.cpp:23: included_from: Included from here.
/usr/include/qt6/QtCore/qfile.h:291:32: note: declared here
#  291 |     QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override;
#      |                                ^~~~
# 1671|   	if (!s.isEmpty()) {
# 1672|   		QFile file(s);
# 1673|-> 		file.open(QIODevice::WriteOnly | QIODevice::Truncate);
# 1674|   		file.write((const char *)m_buf, m_size);
# 1675|   		file.close();

Error: COMPILER_WARNING (CWE-252): [#def394]
v4l-utils-1.32.0/utils/qv4l2/qv4l2.cpp: scope_hint: In member function ‘void ApplicationWindow::openRawFile(const QString&)’
v4l-utils-1.32.0/utils/qv4l2/qv4l2.cpp:1715:23: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’
# 1715 |         m_saveRaw.open(QIODevice::WriteOnly | QIODevice::Truncate);
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qfile.h:291:32: note: declared here
#  291 |     QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override;
#      |                                ^~~~
# 1713|   		m_saveRaw.close();
# 1714|   	m_saveRaw.setFileName(s);
# 1715|-> 	m_saveRaw.open(QIODevice::WriteOnly | QIODevice::Truncate);
# 1716|   	m_saveRawAct->setChecked(true);
# 1717|   }

Error: COMPILER_WARNING: [#def395]
v4l-utils-1.32.0/utils/rds-ctl/rds-ctl.cpp: scope_hint: In function ‘void print_rds_eon(const v4l2_rds_eon_set*)’
v4l-utils-1.32.0/utils/rds-ctl/rds-ctl.cpp:451:13: warning[-Wunused-but-set-variable=]: variable ‘counter’ set but not used
#  451 |         int counter = 0;
#      |             ^~~~~~~
#  449|   static void print_rds_eon(const struct v4l2_rds_eon_set *eon_set)
#  450|   {
#  451|-> 	int counter = 0;
#  452|   
#  453|   	printf("\n\nEnhanced Other Network information: %u channels", eon_set->size);

Error: CPPCHECK_WARNING (CWE-401): [#def396]
v4l-utils-1.32.0/utils/v4l2-compliance/v4l2-test-controls.cpp:926: error[memleak]: Memory leak: ctrl.string
#  924|   			}
#  925|   			if (ret)
#  926|-> 				return fail("g_ext_ctrls returned an error (%d)\n", ret);
#  927|   			if (checkExtendedCtrl(ctrl, qctrl))
#  928|   				return fail("invalid control %08x\n", qctrl.id);

Error: CPPCHECK_WARNING (CWE-401): [#def397]
v4l-utils-1.32.0/utils/v4l2-compliance/v4l2-test-input-output.cpp:479: error[memleak]: Memory leak: ctrl.p_u8
#  477|   	ctrls.count = 1;
#  478|   	ctrls.controls = &ctrl;
#  479|-> 	fail_on_test(node->g_ext_ctrls(ctrls));
#  480|   	for (unsigned i = 0; i < qextctrl.elems; i++) {
#  481|   		fail_on_test(ctrl.p_u8[i] != qextctrl.default_value);

Error: CPPCHECK_WARNING (CWE-369): [#def398]
v4l-utils-1.32.0/utils/v4l2-ctl/v4l2-ctl-streaming.cpp:1430: error[zerodiv]: Division by zero.
# 1428|   		write_u32(fout, buf.g_field());
# 1429|   		write_u32(fout, buf.g_flags());
# 1430|-> 		comp_perc += (tot_comp_size * 100 / tot_used);
# 1431|   		comp_perc_count++;
# 1432|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def399]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:3219: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 3217|   	//struct v4l2_fract	min;
# 3218|   	void *min_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "min");
# 3219|-> 	p->min = *static_cast<struct v4l2_fract*>(min_ptr);
# 3220|   	free(min_ptr);
# 3221|   

Error: CPPCHECK_WARNING (CWE-476): [#def400]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:3224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 3222|   	//struct v4l2_fract	max;
# 3223|   	void *max_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "max");
# 3224|-> 	p->max = *static_cast<struct v4l2_fract*>(max_ptr);
# 3225|   	free(max_ptr);
# 3226|   

Error: CPPCHECK_WARNING (CWE-476): [#def401]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:3229: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 3227|   	//struct v4l2_fract	step;
# 3228|   	void *step_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "step");
# 3229|-> 	p->step = *static_cast<struct v4l2_fract*>(step_ptr);
# 3230|   	free(step_ptr);
# 3231|   

Error: CPPCHECK_WARNING (CWE-476): [#def402]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:3539: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 3537|   	//struct v4l2_rect        c;
# 3538|   	void *c_ptr = (void *) retrace_v4l2_rect_gen(v4l2_clip_obj, "c");
# 3539|-> 	p->c = *static_cast<struct v4l2_rect*>(c_ptr);
# 3540|   	free(c_ptr);
# 3541|   

Error: CPPCHECK_WARNING (CWE-476): [#def403]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:3557: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 3555|   	//struct v4l2_rect        w;
# 3556|   	void *w_ptr = (void *) retrace_v4l2_rect_gen(v4l2_window_obj, "w");
# 3557|-> 	p->w = *static_cast<struct v4l2_rect*>(w_ptr);
# 3558|   	free(w_ptr);
# 3559|   

Error: CPPCHECK_WARNING (CWE-476): [#def404]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:5211: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 5209|   	//struct v4l2_dbg_match match;
# 5210|   	void *match_ptr = (void *) retrace_v4l2_dbg_match_gen(v4l2_dbg_register_obj, "match");
# 5211|-> 	p->match = *static_cast<struct v4l2_dbg_match*>(match_ptr);
# 5212|   	free(match_ptr);
# 5213|   

Error: CPPCHECK_WARNING (CWE-476): [#def405]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:5240: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 5238|   	//struct v4l2_dbg_match match;
# 5239|   	void *match_ptr = (void *) retrace_v4l2_dbg_match_gen(v4l2_dbg_chip_info_obj, "match");
# 5240|-> 	p->match = *static_cast<struct v4l2_dbg_match*>(match_ptr);
# 5241|   	free(match_ptr);
# 5242|   

Error: CPPCHECK_WARNING (CWE-476): [#def406]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:5467: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 5465|   	//struct media_pad_desc source;
# 5466|   	void *source_ptr = (void *) retrace_media_pad_desc_gen(media_link_desc_obj, "source");
# 5467|-> 	p->source = *static_cast<struct media_pad_desc*>(source_ptr);
# 5468|   	free(source_ptr);
# 5469|   

Error: CPPCHECK_WARNING (CWE-476): [#def407]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace-gen.cpp:5472: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
# 5470|   	//struct media_pad_desc sink;
# 5471|   	void *sink_ptr = (void *) retrace_media_pad_desc_gen(media_link_desc_obj, "sink");
# 5472|-> 	p->sink = *static_cast<struct media_pad_desc*>(sink_ptr);
# 5473|   	free(sink_ptr);
# 5474|   

Error: CPPCHECK_WARNING (CWE-476): [#def408]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:208: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  206|   	json_object *bytesused_obj;
#  207|   	json_object_object_get_ex(plane_obj, "bytesused", &bytesused_obj);
#  208|-> 	ptr->bytesused = (__u32) json_object_get_int64(bytesused_obj);
#  209|   
#  210|   	json_object *length_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def409]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:212: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  210|   	json_object *length_obj;
#  211|   	json_object_object_get_ex(plane_obj, "length", &length_obj);
#  212|-> 	ptr->length = (__u32) json_object_get_int64(length_obj);
#  213|   
#  214|   	json_object *m_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def410]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:219: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  217|   		json_object *mem_offset_obj;
#  218|   		json_object_object_get_ex(m_obj, "mem_offset", &mem_offset_obj);
#  219|-> 		ptr->m.mem_offset = (__u32) json_object_get_int64(mem_offset_obj);
#  220|   	}
#  221|   

Error: CPPCHECK_WARNING (CWE-476): [#def411]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  222|   	json_object *data_offset_obj;
#  223|   	json_object_object_get_ex(plane_obj, "data_offset", &data_offset_obj);
#  224|-> 	ptr->data_offset = (__u32) json_object_get_int64(data_offset_obj);
#  225|   
#  226|   	return ptr;

Error: CPPCHECK_WARNING (CWE-476): [#def412]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:238: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  236|   	json_object *index_obj;
#  237|   	json_object_object_get_ex(buf_obj, "index", &index_obj);
#  238|-> 	buf->index = (__u32) json_object_get_uint64(index_obj);
#  239|   
#  240|   	json_object *type_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def413]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:242: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  240|   	json_object *type_obj;
#  241|   	json_object_object_get_ex(buf_obj, "type", &type_obj);
#  242|-> 	buf->type = s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
#  243|   
#  244|   	json_object *bytesused_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def414]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:246: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  244|   	json_object *bytesused_obj;
#  245|   	json_object_object_get_ex(buf_obj, "bytesused", &bytesused_obj);
#  246|-> 	buf->bytesused = (__u32) json_object_get_uint64(bytesused_obj);
#  247|   
#  248|   	json_object *flags_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def415]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:250: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  248|   	json_object *flags_obj;
#  249|   	json_object_object_get_ex(buf_obj, "flags", &flags_obj);
#  250|-> 	buf->flags = (__u32) s2flags_buffer(json_object_get_string(flags_obj));
#  251|   
#  252|   	json_object *field_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def416]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:254: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  252|   	json_object *field_obj;
#  253|   	json_object_object_get_ex(buf_obj, "field", &field_obj);
#  254|-> 	buf->field = (__u32) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
#  255|   
#  256|   	json_object *timestamp_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def417]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:266: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  264|   	json_object_object_get_ex(timestamp_obj, "tv_usec", &tv_usec_obj);
#  265|   	tval.tv_usec = json_object_get_int64(tv_usec_obj);
#  266|-> 	buf->timestamp = tval;
#  267|   
#  268|   	json_object *sequence_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def418]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:270: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  268|   	json_object *sequence_obj;
#  269|   	json_object_object_get_ex(buf_obj, "sequence", &sequence_obj);
#  270|-> 	buf->sequence = (__u32) json_object_get_uint64(sequence_obj);
#  271|   
#  272|   	json_object *memory_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def419]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:274: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  272|   	json_object *memory_obj;
#  273|   	json_object_object_get_ex(buf_obj, "memory", &memory_obj);
#  274|-> 	buf->memory = s2val(json_object_get_string(memory_obj), v4l2_memory_val_def);
#  275|   
#  276|   	json_object *length_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def420]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:278: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  276|   	json_object *length_obj;
#  277|   	json_object_object_get_ex(buf_obj, "length", &length_obj);
#  278|-> 	buf->length = (__u32) json_object_get_uint64(length_obj);
#  279|   
#  280|   	json_object *m_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def421]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:283: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  281|   	json_object_object_get_ex(buf_obj, "m", &m_obj);
#  282|   
#  283|-> 	if (buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ||
#  284|   	    buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
#  285|   		json_object *planes_obj;

Error: CPPCHECK_WARNING (CWE-476): [#def422]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:284: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  282|   
#  283|   	if (buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE ||
#  284|-> 	    buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
#  285|   		json_object *planes_obj;
#  286|   		json_object_object_get_ex(m_obj, "planes", &planes_obj);

Error: CPPCHECK_WARNING (CWE-476): [#def423]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:292: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  290|   	}
#  291|   
#  292|-> 	if (buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
#  293|   	    buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
#  294|   		if (buf->memory == V4L2_MEMORY_MMAP) {

Error: CPPCHECK_WARNING (CWE-476): [#def424]
v4l-utils-1.32.0/utils/v4l2-tracer/retrace.cpp:293: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  291|   
#  292|   	if (buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
#  293|-> 	    buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
#  294|   		if (buf->memory == V4L2_MEMORY_MMAP) {
#  295|   			json_object *offset_obj;

Error: COMPILER_WARNING: [#def425]
v4l-utils-1.32.0/utils/v4l2-tracer/trace.cpp: scope_hint: In function ‘void trace_mem_decoded()’
v4l-utils-1.32.0/utils/v4l2-tracer/trace.cpp:165:13: warning[-Wunused-but-set-variable=]: variable ‘displayed_count’ set but not used
#  165 |         int displayed_count = 0;
#      |             ^~~~~~~~~~~~~~~
#  163|   void trace_mem_decoded(void)
#  164|   {
#  165|-> 	int displayed_count = 0;
#  166|   	unsigned expected_length = get_expected_length_trace();
#  167|   

Error: CPPCHECK_WARNING (CWE-476): [#def426]
v4l-utils-1.32.0/utils/v4l2-tracer/trace.cpp:196: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  194|   				unsigned char *buffer_pointer = (unsigned char*) it->address;
#  195|   				for (__u32 i = 0; i < expected_length; i++)
#  196|-> 					fwrite(&buffer_pointer[i], sizeof(unsigned char), 1, fp);
#  197|   				fclose(fp);
#  198|   			}

Error: CPPCHECK_WARNING (CWE-476): [#def427]
v4l-utils-1.32.0/utils/v4l2-tracer/trace.cpp:197: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  195|   				for (__u32 i = 0; i < expected_length; i++)
#  196|   					fwrite(&buffer_pointer[i], sizeof(unsigned char), 1, fp);
#  197|-> 				fclose(fp);
#  198|   			}
#  199|   			trace_mem(it->fd, it->offset, it->type, it->index, it->bytesused, it->address);

Error: CPPCHECK_WARNING (CWE-476): [#def428]
v4l-utils-1.32.0/utils/v4l2-tracer/v4l2-tracer.cpp:352: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: trace_file
#  350|   	/* Close the json-array and the trace file. */
#  351|   	trace_file = fopen(trace_filename.c_str(), "r+");
#  352|-> 	fseek(trace_file, -2L, SEEK_END);
#  353|   	fputs("\n]\n", trace_file);
#  354|   	fclose(trace_file);

Error: CPPCHECK_WARNING (CWE-476): [#def429]
v4l-utils-1.32.0/utils/v4l2-tracer/v4l2-tracer.cpp:353: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: trace_file
#  351|   	trace_file = fopen(trace_filename.c_str(), "r+");
#  352|   	fseek(trace_file, -2L, SEEK_END);
#  353|-> 	fputs("\n]\n", trace_file);
#  354|   	fclose(trace_file);
#  355|   

Error: CPPCHECK_WARNING (CWE-476): [#def430]
v4l-utils-1.32.0/utils/v4l2-tracer/v4l2-tracer.cpp:354: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: trace_file
#  352|   	fseek(trace_file, -2L, SEEK_END);
#  353|   	fputs("\n]\n", trace_file);
#  354|-> 	fclose(trace_file);
#  355|   
#  356|   	if (retrace)

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
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-24.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-namev4l-utils-1.32.0-1.fc44
store-results-to/tmp/tmp1dsfxqxe/v4l-utils-1.32.0-1.fc44.tar.xz
time-created2026-01-08 21:59:37
time-finished2026-01-08 22:02:58
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp1dsfxqxe/v4l-utils-1.32.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp1dsfxqxe/v4l-utils-1.32.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9