kbd-2.9.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
kbd-2.9.0/src/libcommon/getfd.c:54:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
kbd-2.9.0/src/libcommon/getfd.c:49:14: acquire_resource: opened here
kbd-2.9.0/src/libcommon/getfd.c:50:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/libcommon/getfd.c:54:12: branch_false: ...to here
kbd-2.9.0/src/libcommon/getfd.c:54:12: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   52|   	if (fd < 0)
#   53|   		fd = open(fnam, O_RDONLY);
#   54|-> 	if (fd < 0)
#   55|   		return -1;
#   56|   	return fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
kbd-2.9.0/src/libcommon/getfd.c:68:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_a_console(fnam)’
kbd-2.9.0/src/libcommon/getfd.c:60:1: enter_function: entry to ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:64:12: branch_true: following ‘true’ branch (when ‘fnam’ is non-NULL)...
kbd-2.9.0/src/libcommon/getfd.c:65:27: branch_true: ...to here
kbd-2.9.0/src/libcommon/getfd.c:65:27: call_function: calling ‘open_a_console’ from ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:65:27: return_function: returning to ‘getfd’ from ‘open_a_console’
kbd-2.9.0/src/libcommon/getfd.c:65:20: branch_true: following ‘true’ branch...
kbd-2.9.0/src/libcommon/getfd.c:66:29: branch_true: ...to here
kbd-2.9.0/src/libcommon/getfd.c:66:29: call_function: calling ‘is_a_console’ from ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:66:29: return_function: returning to ‘getfd’ from ‘is_a_console’
kbd-2.9.0/src/libcommon/getfd.c:66:28: branch_false: following ‘false’ branch...
kbd-2.9.0/src/libcommon/getfd.c:68:25: branch_false: ...to here
kbd-2.9.0/src/libcommon/getfd.c:68:25: danger: ‘open_a_console(fnam)’ leaks here; was opened at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#   66|   			if (is_a_console(fd))
#   67|   				return fd;
#   68|-> 			close(fd);
#   69|   		}
#   70|   		fprintf(stderr, _("Couldn't open %s"), fnam);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
kbd-2.9.0/src/libcommon/getfd.c:79:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_a_console(conspath[i])’
kbd-2.9.0/src/libcommon/getfd.c:60:1: enter_function: entry to ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:64:12: branch_false: following ‘false’ branch (when ‘fnam’ is NULL)...
kbd-2.9.0/src/libcommon/getfd.c:64:12: branch_false: ...to here
kbd-2.9.0/src/libcommon/getfd.c:75:21: branch_true: following ‘true’ branch...
kbd-2.9.0/src/libcommon/getfd.c:76:27: branch_true: ...to here
kbd-2.9.0/src/libcommon/getfd.c:76:27: call_function: calling ‘open_a_console’ from ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:76:27: return_function: returning to ‘getfd’ from ‘open_a_console’
kbd-2.9.0/src/libcommon/getfd.c:76:20: branch_true: following ‘true’ branch...
kbd-2.9.0/src/libcommon/getfd.c:77:29: branch_true: ...to here
kbd-2.9.0/src/libcommon/getfd.c:77:29: call_function: calling ‘is_a_console’ from ‘getfd’
kbd-2.9.0/src/libcommon/getfd.c:77:29: return_function: returning to ‘getfd’ from ‘is_a_console’
kbd-2.9.0/src/libcommon/getfd.c:77:28: branch_false: following ‘false’ branch...
kbd-2.9.0/src/libcommon/getfd.c:79:25: branch_false: ...to here
kbd-2.9.0/src/libcommon/getfd.c:79:25: danger: ‘open_a_console(conspath[i])’ leaks here; was opened at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#   77|   			if (is_a_console(fd))
#   78|   				return fd;
#   79|-> 			close(fd);
#   80|   		}
#   81|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def4]
kbd-2.9.0/src/libkbdfile/init.c:20:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
kbd-2.9.0/src/libkbdfile/init.c:17:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/init.c:19:9: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/init.c:19:9: acquire_resource: 'va_start' called here
kbd-2.9.0/src/libkbdfile/init.c:20:9: throw: if the called function throws an exception...
kbd-2.9.0/src/libkbdfile/init.c:20:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   18|   		return;
#   19|   	va_start(args, fmt);
#   20|-> 	ctx->log_fn(ctx->log_data, priority, file, line, fn, fmt, args);
#   21|   	va_end(args);
#   22|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
kbd-2.9.0/src/libkbdfile/kbdfile.c:44:27: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
kbd-2.9.0/src/libkbdfile/kbdfile.c:527:1: enter_function: entry to 'kbdfile_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:529:30: call_function: calling 'kbdfile_new' from 'kbdfile_open'
#   42|   
#   43|   	if (!fp->ctx) {
#   44|-> 		fp->ctx = kbdfile_context_new();
#   45|   		if (!fp->ctx) {
#   46|   			free(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
kbd-2.9.0/src/libkbdfile/kbdfile.c:77:17: warning[-Wanalyzer-malloc-leak]: leak of 'kbdfile_new(ctx)'
kbd-2.9.0/src/libkbdfile/kbdfile.c:527:1: enter_function: entry to 'kbdfile_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:529:30: call_function: calling 'kbdfile_new' from 'kbdfile_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:529:30: return_function: returning to 'kbdfile_open' from 'kbdfile_new'
kbd-2.9.0/src/libkbdfile/kbdfile.c:531:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:534:9: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:534:9: call_function: calling 'kbdfile_set_pathname' from 'kbdfile_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:534:9: return_function: returning to 'kbdfile_open' from 'kbdfile_set_pathname'
kbd-2.9.0/src/libkbdfile/kbdfile.c:536:13: call_function: calling 'maybe_pipe_open' from 'kbdfile_open'
#   75|   kbdfile_set_pathname(struct kbdfile *fp, const char *pathname)
#   76|   {
#   77|-> 	strncpy(fp->pathname, pathname, sizeof(fp->pathname) - 1);
#   78|   	return 0;
#   79|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
kbd-2.9.0/src/libkbdfile/kbdfile.c:160:18: warning[-Wanalyzer-malloc-leak]: leak of 'pipe_cmd'
kbd-2.9.0/src/libkbdfile/kbdfile.c:241:1: enter_function: entry to 'maybe_pipe_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:258:38: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:259:27: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:265:22: call_function: calling 'open_pathname' from 'maybe_pipe_open'
#  158|   	sprintf(pipe_cmd, "%s %s", dc->cmd, fp->pathname);
#  159|   
#  160|-> 	fp->fd = popen(pipe_cmd, "r");
#  161|   	fp->flags |= KBDFILE_PIPE | KBDFILE_COMPRESSED;
#  162|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
kbd-2.9.0/src/libkbdfile/kbdfile.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of 'pipe_cmd'
kbd-2.9.0/src/libkbdfile/kbdfile.c:241:1: enter_function: entry to 'maybe_pipe_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:258:38: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:259:27: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:265:22: call_function: calling 'open_pathname' from 'maybe_pipe_open'
#  163|   	if (!(fp->fd)) {
#  164|   		char buf[200];
#  165|-> 		ERR(fp->ctx, "popen: %s: %s", pipe_cmd, kbd_strerror(errno, buf, sizeof(buf)));
#  166|   		free(pipe_cmd);
#  167|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
kbd-2.9.0/src/libkbdfile/kbdfile.c:193:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&*fp.pathname, "r")'
kbd-2.9.0/src/libkbdfile/kbdfile.c:241:1: enter_function: entry to 'maybe_pipe_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:258:38: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:259:27: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:265:22: call_function: calling 'open_pathname' from 'maybe_pipe_open'
#  191|   	}
#  192|   
#  193|-> 	fp->flags &= ~KBDFILE_PIPE;
#  194|   	fp->flags &= ~KBDFILE_COMPRESSED;
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
kbd-2.9.0/src/libkbdfile/kbdfile.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&*fp.pathname, "r")'
kbd-2.9.0/src/libkbdfile/kbdfile.c:241:1: enter_function: entry to 'maybe_pipe_open'
kbd-2.9.0/src/libkbdfile/kbdfile.c:258:38: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:259:27: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:265:22: call_function: calling 'open_pathname' from 'maybe_pipe_open'
#  191|   	}
#  192|   
#  193|-> 	fp->flags &= ~KBDFILE_PIPE;
#  194|   	fp->flags &= ~KBDFILE_COMPRESSED;
#  195|   

Error: COMPILER_WARNING (CWE-704): [#def11]
kbd-2.9.0/src/libkbdfile/kbdfile.c: scope_hint: In function 'findfile_in_dir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:350:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  350 |         ff = strchr(fnam, '/');
#      |            ^
#  348|   	dir_len = strlen(dir);
#  349|   
#  350|-> 	ff = strchr(fnam, '/');
#  351|   	fdir = NULL;
#  352|   

Error: COMPILER_WARNING (CWE-704): [#def12]
kbd-2.9.0/src/libkbdfile/kbdfile.c:350:12: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  348|   	dir_len = strlen(dir);
#  349|   
#  350|-> 	ff = strchr(fnam, '/');
#  351|   	fdir = NULL;
#  352|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
kbd-2.9.0/src/libkbdfile/kbdfile.c:357:25: warning[-Wanalyzer-malloc-leak]: leak of 'fdir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:337:1: enter_function: entry to 'findfile_in_dir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:24: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:366:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:372:22: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:389:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:37: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:394:21: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:397:28: branch_false: following 'false' branch (when 'path' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:402:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:404:28: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:405:36: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:62: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:46: call_function: calling 'findfile_in_dir' from 'findfile_in_dir'
#  355|   
#  356|   		if (fdir == NULL) {
#  357|-> 			ERR(fp->ctx, "strndup: %s", kbd_strerror(errno, errbuf, sizeof(errbuf)));
#  358|   			return -1;
#  359|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
kbd-2.9.0/src/libkbdfile/kbdfile.c:357:25: warning[-Wanalyzer-malloc-leak]: leak of 'path'
kbd-2.9.0/src/libkbdfile/kbdfile.c:337:1: enter_function: entry to 'findfile_in_dir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:366:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:372:22: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:389:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:37: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:394:21: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:397:28: branch_false: following 'false' branch (when 'path' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:402:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:404:28: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:405:36: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:62: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:46: call_function: calling 'findfile_in_dir' from 'findfile_in_dir'
#  355|   
#  356|   		if (fdir == NULL) {
#  357|-> 			ERR(fp->ctx, "strndup: %s", kbd_strerror(errno, errbuf, sizeof(errbuf)));
#  358|   			return -1;
#  359|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
kbd-2.9.0/src/libkbdfile/kbdfile.c:364:23: warning[-Wanalyzer-malloc-leak]: leak of 'fdir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:24: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:364:23: throw: if 'scandir' throws an exception...
kbd-2.9.0/src/libkbdfile/kbdfile.c:364:23: danger: 'fdir' leaks here; was allocated at [(4)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/3)
#  362|   	struct dirent **namelist = NULL;
#  363|   
#  364|-> 	int dirents = scandir(dir, &namelist, NULL, alphasort);
#  365|   
#  366|   	if (dirents < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
kbd-2.9.0/src/libkbdfile/kbdfile.c:364:23: warning[-Wanalyzer-malloc-leak]: leak of 'path'
kbd-2.9.0/src/libkbdfile/kbdfile.c:337:1: enter_function: entry to 'findfile_in_dir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:366:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:372:22: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:389:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:37: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:394:21: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:397:28: branch_false: following 'false' branch (when 'path' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:402:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:404:28: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:405:36: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:62: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:46: call_function: calling 'findfile_in_dir' from 'findfile_in_dir'
#  362|   	struct dirent **namelist = NULL;
#  363|   
#  364|-> 	int dirents = scandir(dir, &namelist, NULL, alphasort);
#  365|   
#  366|   	if (dirents < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: warning[-Wanalyzer-malloc-leak]: leak of 'fdir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:24: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:366:12: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: throw: if 'kbdfile_log' throws an exception...
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: danger: 'fdir' leaks here; was allocated at [(4)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/3)
#  365|   
#  366|   	if (dirents < 0) {
#  367|-> 		DBG(fp->ctx, "scandir: %s: %s", dir, kbd_strerror(errno, errbuf, sizeof(errbuf)));
#  368|   		rc = -1;
#  369|   		goto EndScan;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
kbd-2.9.0/src/libkbdfile/kbdfile.c:367:17: warning[-Wanalyzer-malloc-leak]: leak of 'path'
kbd-2.9.0/src/libkbdfile/kbdfile.c:337:1: enter_function: entry to 'findfile_in_dir'
kbd-2.9.0/src/libkbdfile/kbdfile.c:353:12: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:354:47: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:356:20: branch_false: following 'false' branch (when 'fdir' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:362:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:366:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:372:22: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:389:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:29: branch_true: following 'true' branch (when 'ff' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:392:37: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:394:21: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:395:32: acquire_memory: allocated here
kbd-2.9.0/src/libkbdfile/kbdfile.c:397:28: branch_false: following 'false' branch (when 'path' is non-NULL)...
kbd-2.9.0/src/libkbdfile/kbdfile.c:402:25: branch_false: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:404:28: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:405:36: branch_true: following 'true' branch...
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:62: branch_true: ...to here
kbd-2.9.0/src/libkbdfile/kbdfile.c:406:46: call_function: calling 'findfile_in_dir' from 'findfile_in_dir'
#  365|   
#  366|   	if (dirents < 0) {
#  367|-> 		DBG(fp->ctx, "scandir: %s: %s", dir, kbd_strerror(errno, errbuf, sizeof(errbuf)));
#  368|   		rc = -1;
#  369|   		goto EndScan;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
kbd-2.9.0/src/libkeymap/analyze.c:2303:54: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)'
kbd-2.9.0/src/libkeymap/analyze.c:2290:21: enter_function: entry to 'yy_create_buffer'
kbd-2.9.0/src/libkeymap/analyze.c:2294:24: call_function: inlined call to 'yyalloc' from 'yy_create_buffer'
kbd-2.9.0/src/libkeymap/analyze.c:2295:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/analyze.c:2298:2: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.c:2303:54: danger: 'malloc(64)' leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2301|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 2302|   	 * we need to put in 2 end-of-buffer characters.
# 2303|-> 	 */
# 2304|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2305|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
kbd-2.9.0/src/libkeymap/analyze.c:2303:54: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(64, yyscanner)'
kbd-2.9.0/src/libkeymap/analyze.c:2290:21: enter_function: entry to 'yy_create_buffer'
kbd-2.9.0/src/libkeymap/analyze.c:2294:24: call_function: calling 'yyalloc' from 'yy_create_buffer'
kbd-2.9.0/src/libkeymap/analyze.c:2294:24: return_function: returning to 'yy_create_buffer' from 'yyalloc'
kbd-2.9.0/src/libkeymap/analyze.c:2295:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/analyze.c:2298:2: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.c:2303:54: danger: 'yyalloc(64, yyscanner)' leaks here; was allocated at [(4)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/3)
# 2301|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 2302|   	 * we need to put in 2 end-of-buffer characters.
# 2303|-> 	 */
# 2304|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2305|   	if ( ! b->yy_ch_buf )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
kbd-2.9.0/src/libkeymap/analyze.c:2346:2: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
kbd-2.9.0/src/libkeymap/analyze.c:2225:10: enter_function: entry to 'yyrestart'
kbd-2.9.0/src/libkeymap/analyze.c:2230:16: call_function: calling 'yyensure_buffer_stack' from 'yyrestart'
kbd-2.9.0/src/libkeymap/analyze.c:2230:16: return_function: returning to 'yyrestart' from 'yyensure_buffer_stack'
kbd-2.9.0/src/libkeymap/analyze.c:2232:27: call_function: calling 'yy_create_buffer' from 'yyrestart'
kbd-2.9.0/src/libkeymap/analyze.c:2232:27: return_function: returning to 'yyrestart' from 'yy_create_buffer'
kbd-2.9.0/src/libkeymap/analyze.c:2235:2: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/analyze.c:2235:2: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.c:2235:2: call_function: calling 'yy_init_buffer' from 'yyrestart'
# 2344|   
# 2345|   	yy_flush_buffer( b , yyscanner);
# 2346|-> 
# 2347|   	b->yy_input_file = file;
# 2348|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
kbd-2.9.0/src/libkeymap/analyze.c:2564:26: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(n)'
kbd-2.9.0/src/libkeymap/analyze.c:2548:17: enter_function: entry to 'yy_scan_bytes'
kbd-2.9.0/src/libkeymap/analyze.c:2557:24: call_function: inlined call to 'yyalloc' from 'yy_scan_bytes'
kbd-2.9.0/src/libkeymap/analyze.c:2558:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/analyze.c:2558:12: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.c:2566:6: call_function: calling 'yy_scan_buffer' from 'yy_scan_bytes'
# 2562|   	for ( i = 0; i < _yybytes_len; ++i )
# 2563|   		buf[i] = yybytes[i];
# 2564|-> 
# 2565|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2566|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
kbd-2.9.0/src/libkeymap/analyze.c:2564:26: warning[-Wanalyzer-malloc-leak]: leak of 'yyalloc(n,  yyscanner)'
kbd-2.9.0/src/libkeymap/analyze.c:2548:17: enter_function: entry to 'yy_scan_bytes'
kbd-2.9.0/src/libkeymap/analyze.c:2557:24: call_function: calling 'yyalloc' from 'yy_scan_bytes'
kbd-2.9.0/src/libkeymap/analyze.c:2557:24: return_function: returning to 'yy_scan_bytes' from 'yyalloc'
kbd-2.9.0/src/libkeymap/analyze.c:2558:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/analyze.c:2558:12: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.c:2566:6: call_function: calling 'yy_scan_buffer' from 'yy_scan_bytes'
# 2562|   	for ( i = 0; i < _yybytes_len; ++i )
# 2563|   		buf[i] = yybytes[i];
# 2564|-> 
# 2565|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2566|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
kbd-2.9.0/src/libkeymap/analyze.l:148:17: warning[-Wanalyzer-malloc-leak]: leak of 't0'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  146|   		rc = kbdfile_find(filename, include_dirpath2, include_suffixes, fp);
#  147|   	} else {
#  148|-> 		ERR(ctx, _("out of memory"));
#  149|   		rc = -1;
#  150|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
kbd-2.9.0/src/libkeymap/analyze.l:148:17: warning[-Wanalyzer-malloc-leak]: leak of 't1'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  146|   		rc = kbdfile_find(filename, include_dirpath2, include_suffixes, fp);
#  147|   	} else {
#  148|-> 		ERR(ctx, _("out of memory"));
#  149|   		rc = -1;
#  150|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
kbd-2.9.0/src/libkeymap/analyze.l:148:17: warning[-Wanalyzer-malloc-leak]: leak of 't2'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  146|   		rc = kbdfile_find(filename, include_dirpath2, include_suffixes, fp);
#  147|   	} else {
#  148|-> 		ERR(ctx, _("out of memory"));
#  149|   		rc = -1;
#  150|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
kbd-2.9.0/src/libkeymap/analyze.l:251:9: warning[-Wanalyzer-malloc-leak]: leak of 'filename'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:389:50: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  249|   	struct kbdfile *fp;
#  250|   
#  251|-> 	INFO(ctx, _("switching to %s"), filename);
#  252|   
#  253|   	fp = kbdfile_new(ctx->kbdfile_ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
kbd-2.9.0/src/libkeymap/analyze.l:253:14: warning[-Wanalyzer-malloc-leak]: leak of 'filename'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:389:50: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  251|   	INFO(ctx, _("switching to %s"), filename);
#  252|   
#  253|-> 	fp = kbdfile_new(ctx->kbdfile_ctx);
#  254|   	if (!fp) {
#  255|   		ERR(ctx, _("out of memory"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
kbd-2.9.0/src/libkeymap/analyze.l:255:17: warning[-Wanalyzer-malloc-leak]: leak of 'filename'
kbd-2.9.0/src/libkeymap/analyze.c:1345:1: enter_function: entry to 'yylex'
kbd-2.9.0/src/libkeymap/analyze.l:389:50: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/analyze.l:390:36: branch_false: following 'false' branch (when 'filename' is non-NULL)...
kbd-2.9.0/src/libkeymap/analyze.l:395:38: branch_false: ...to here
kbd-2.9.0/src/libkeymap/analyze.l:395:38: call_function: calling 'open_include' from 'yylex'
#  253|   	fp = kbdfile_new(ctx->kbdfile_ctx);
#  254|   	if (!fp) {
#  255|-> 		ERR(ctx, _("out of memory"));
#  256|   		return NULL;
#  257|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def30]
kbd-2.9.0/src/libkeymap/common.c:19:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
kbd-2.9.0/src/libkeymap/common.c:16:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:18:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:18:9: acquire_resource: 'va_start' called here
kbd-2.9.0/src/libkeymap/common.c:19:9: throw: if the called function throws an exception...
kbd-2.9.0/src/libkeymap/common.c:19:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   17|   		return;
#   18|   	va_start(args, fmt);
#   19|-> 	ctx->log_fn(ctx->log_data, priority, file, line, fn, fmt, args);
#   20|   	va_end(args);
#   21|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
kbd-2.9.0/src/libkeymap/common.c:162:14: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
kbd-2.9.0/src/libkeymap/common.c:175:1: enter_function: entry to 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:179:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:180:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:183:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:185:9: call_function: calling 'lk_set_log_fn' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:185:9: return_function: returning to 'lk_init' from 'lk_set_log_fn'
kbd-2.9.0/src/libkeymap/common.c:186:9: call_function: calling 'lk_set_log_priority' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:186:9: return_function: returning to 'lk_init' from 'lk_set_log_priority'
kbd-2.9.0/src/libkeymap/common.c:190:22: call_function: calling 'init_array' from 'lk_init'
#  160|   	}
#  161|   
#  162|-> 	rc = lk_array_init(ptr, size, 0);
#  163|   	if (rc < 0) {
#  164|   		ERR(ctx, _("unable to initialize array: %s"), strerror(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
kbd-2.9.0/src/libkeymap/common.c:162:14: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
kbd-2.9.0/src/libkeymap/common.c:156:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:157:12: branch_false: following 'false' branch (when 'ptr' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:162:14: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:162:14: throw: if 'lk_array_init' throws an exception...
kbd-2.9.0/src/libkeymap/common.c:162:14: danger: 'ptr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  160|   	}
#  161|   
#  162|-> 	rc = lk_array_init(ptr, size, 0);
#  163|   	if (rc < 0) {
#  164|   		ERR(ctx, _("unable to initialize array: %s"), strerror(rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
kbd-2.9.0/src/libkeymap/common.c:201:28: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
kbd-2.9.0/src/libkeymap/common.c:175:1: enter_function: entry to 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:179:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:180:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:183:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:185:9: call_function: calling 'lk_set_log_fn' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:185:9: return_function: returning to 'lk_init' from 'lk_set_log_fn'
kbd-2.9.0/src/libkeymap/common.c:186:9: call_function: calling 'lk_set_log_priority' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:186:9: return_function: returning to 'lk_init' from 'lk_set_log_priority'
kbd-2.9.0/src/libkeymap/common.c:190:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:190:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:191:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:191:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:191:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:191:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:192:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:192:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:192:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:192:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:193:15: branch_false: following 'false' branch (when 'ret == 0')...
kbd-2.9.0/src/libkeymap/common.c:193:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:193:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:193:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:194:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:194:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:194:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:194:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:196:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:201:28: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:201:28: throw: if 'kbdfile_context_new' throws an exception...
kbd-2.9.0/src/libkeymap/common.c:201:28: danger: 'ctx' leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  199|   	}
#  200|   
#  201|-> 	ctx->kbdfile_ctx = kbdfile_context_new();
#  202|   
#  203|   	if (ctx->kbdfile_ctx == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
kbd-2.9.0/src/libkeymap/common.c:223:29: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
kbd-2.9.0/src/libkeymap/common.c:175:1: enter_function: entry to 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:179:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:180:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:183:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:185:9: call_function: calling 'lk_set_log_fn' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:185:9: return_function: returning to 'lk_init' from 'lk_set_log_fn'
kbd-2.9.0/src/libkeymap/common.c:186:9: call_function: calling 'lk_set_log_priority' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:186:9: return_function: returning to 'lk_init' from 'lk_set_log_priority'
kbd-2.9.0/src/libkeymap/common.c:190:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:190:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:191:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:191:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:191:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:191:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:192:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/common.c:197:17: branch_true: ...to here
kbd-2.9.0/src/libkeymap/common.c:197:17: call_function: calling 'lk_free' from 'lk_init'
#  221|   
#  222|   	for (int i = 0; i < arr->total; i++) {
#  223|-> 		void *ptr = lk_array_get_ptr(arr, i);
#  224|   
#  225|   		if (!ptr)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
kbd-2.9.0/src/libkeymap/common.c:230:33: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
kbd-2.9.0/src/libkeymap/common.c:175:1: enter_function: entry to 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:179:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:180:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:183:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:185:9: call_function: calling 'lk_set_log_fn' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:185:9: return_function: returning to 'lk_init' from 'lk_set_log_fn'
kbd-2.9.0/src/libkeymap/common.c:186:9: call_function: calling 'lk_set_log_priority' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:186:9: return_function: returning to 'lk_init' from 'lk_set_log_priority'
kbd-2.9.0/src/libkeymap/common.c:190:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:190:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:191:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:191:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:191:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:191:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:192:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/common.c:197:17: branch_true: ...to here
kbd-2.9.0/src/libkeymap/common.c:197:17: call_function: calling 'lk_free' from 'lk_init'
#  228|   		switch(array_type) {
#  229|   			case FREE_CTX_KEYMAP:
#  230|-> 				lk_array_free(ptr);
#  231|   				break;
#  232|   			case FREE_CTX_FUNC_TABLE:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
kbd-2.9.0/src/libkeymap/common.c:240:9: warning[-Wanalyzer-malloc-leak]: leak of 'ctx'
kbd-2.9.0/src/libkeymap/common.c:175:1: enter_function: entry to 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:179:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/common.c:180:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)...
kbd-2.9.0/src/libkeymap/common.c:183:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:185:9: call_function: calling 'lk_set_log_fn' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:185:9: return_function: returning to 'lk_init' from 'lk_set_log_fn'
kbd-2.9.0/src/libkeymap/common.c:186:9: call_function: calling 'lk_set_log_priority' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:186:9: return_function: returning to 'lk_init' from 'lk_set_log_priority'
kbd-2.9.0/src/libkeymap/common.c:190:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:190:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:191:15: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/common.c:191:22: branch_false: ...to here
kbd-2.9.0/src/libkeymap/common.c:191:22: call_function: calling 'init_array' from 'lk_init'
kbd-2.9.0/src/libkeymap/common.c:191:22: return_function: returning to 'lk_init' from 'init_array'
kbd-2.9.0/src/libkeymap/common.c:192:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/common.c:197:17: branch_true: ...to here
kbd-2.9.0/src/libkeymap/common.c:197:17: call_function: calling 'lk_free' from 'lk_init'
#  238|   	}
#  239|   
#  240|-> 	lk_array_free(arr);
#  241|   	free(arr);
#  242|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
kbd-2.9.0/src/libkeymap/diacr.c:55:9: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
kbd-2.9.0/src/libkeymap/diacr.c:45:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/diacr.c:46:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/diacr.c:51:23: branch_false: ...to here
kbd-2.9.0/src/libkeymap/diacr.c:55:9: throw: if 'lk_array_append' throws an exception...
kbd-2.9.0/src/libkeymap/diacr.c:55:9: danger: 'ptr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   53|   	ptr->result = dcr->result;
#   54|   
#   55|-> 	lk_array_append(ctx->accent_table, &ptr);
#   56|   
#   57|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
kbd-2.9.0/src/libkeymap/diacr.c:74:9: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
kbd-2.9.0/src/libkeymap/diacr.c:64:15: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/diacr.c:65:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/diacr.c:70:23: branch_false: ...to here
kbd-2.9.0/src/libkeymap/diacr.c:74:9: throw: if 'lk_array_set' throws an exception...
kbd-2.9.0/src/libkeymap/diacr.c:74:9: danger: 'ptr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   72|   	ptr->result = dcr->result;
#   73|   
#   74|-> 	lk_array_set(ctx->accent_table, index, &ptr);
#   75|   
#   76|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
kbd-2.9.0/src/libkeymap/func.c:48:13: warning[-Wanalyzer-malloc-leak]: leak of 's'
kbd-2.9.0/src/libkeymap/func.c:46:13: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/func.c:48:13: throw: if 'lk_array_set' throws an exception...
kbd-2.9.0/src/libkeymap/func.c:48:13: danger: 's' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   46|   	s = strdup((char *)kbs->kb_string);
#   47|   
#   48|-> 	if (lk_array_set(ctx->func_table, kbs->kb_func, &s) < 0) {
#   49|   		free(s);
#   50|   		ERR(ctx, _("out of memory"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
kbd-2.9.0/src/libkeymap/kmap.c:64:9: warning[-Wanalyzer-malloc-leak]: leak of 'keys'
kbd-2.9.0/src/libkeymap/kmap.c:58:16: acquire_memory: allocated here
kbd-2.9.0/src/libkeymap/kmap.c:59:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/kmap.c:64:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/kmap.c:64:9: throw: if 'lk_array_init' throws an exception...
kbd-2.9.0/src/libkeymap/kmap.c:64:9: danger: 'keys' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   62|   	}
#   63|   
#   64|-> 	lk_array_init(keys, sizeof(unsigned int), 0);
#   65|   
#   66|   	if (lk_array_set(ctx->keymap, k_table, &keys) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
kbd-2.9.0/src/libkeymap/loadkeys.c:155:29: warning[-Wanalyzer-malloc-leak]: leak of 'ostr(ctx, & kbs.kb_string)'
kbd-2.9.0/src/libkeymap/loadkeys.c:185:1: enter_function: entry to 'deffuncs'
kbd-2.9.0/src/libkeymap/loadkeys.c:192:21: branch_true: following 'true' branch (when 'i != 256')...
kbd-2.9.0/src/libkeymap/loadkeys.c:193:31: branch_true: ...to here
kbd-2.9.0/src/libkeymap/loadkeys.c:197:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/loadkeys.c:198:25: branch_true: ...to here
kbd-2.9.0/src/libkeymap/loadkeys.c:200:28: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/loadkeys.c:201:37: branch_true: ...to here
kbd-2.9.0/src/libkeymap/loadkeys.c:201:37: call_function: calling 'ostr' from 'deffuncs'
kbd-2.9.0/src/libkeymap/loadkeys.c:201:37: return_function: returning to 'deffuncs' from 'ostr'
kbd-2.9.0/src/libkeymap/loadkeys.c:202:36: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/loadkeys.c:204:33: branch_false: ...to here
kbd-2.9.0/src/libkeymap/loadkeys.c:204:33: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/loadkeys.c:204:33: branch_true: ...to here
kbd-2.9.0/src/libkeymap/loadkeys.c:204:33: throw: if 'get_sym' throws an exception...
kbd-2.9.0/src/libkeymap/loadkeys.c:155:29: danger: 'ostr(ctx, & kbs.kb_string)' leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#  153|   {
#  154|   	size_t lth = strlen(s);
#  155|-> 	char *ns0  = malloc(4 * lth + 1);
#  156|   	char *ns   = ns0;
#  157|   

Error: COMPILER_WARNING: [#def42]
kbd-2.9.0/src/libkeymap/parser.c: scope_hint: In function 'yyparse'
kbd-2.9.0/src/libkeymap/parser.c:1445:9: warning[-Wunused-but-set-variable=]: variable 'yynerrs' set but not used
# 1445 |     int yynerrs = 0;
#      |         ^~~~~~~
# 1443|   
# 1444|       /* Number of syntax errors so far.  */
# 1445|->     int yynerrs = 0;
# 1446|   
# 1447|       yy_state_fast_t yystate = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def43]
kbd-2.9.0/src/libkeymap/parser.c:1556:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
kbd-2.9.0/src/libkeymap/parser.c:1514:6: branch_true: following 'true' branch...
kbd-2.9.0/src/libkeymap/parser.c:1520:28: branch_true: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1543:10: branch_false: following 'false' branch (when 'yystacksize <= 9999')...
kbd-2.9.0/src/libkeymap/parser.c:1545:7: branch_false: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1554:12: branch_false: following 'false' branch (when 'yyptr' is non-NULL)...
kbd-2.9.0/src/libkeymap/parser.c:1556:9: branch_false: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1556:9: danger: use of uninitialized value 'yyss' here
# 1554|           if (! yyptr)
# 1555|             YYNOMEM;
# 1556|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1557|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1558|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def44]
kbd-2.9.0/src/libkeymap/parser.c:1683:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
kbd-2.9.0/src/libkeymap/parser.c:1514:6: branch_false: following 'false' branch...
kbd-2.9.0/src/libkeymap/parser.c:1578:6: branch_false: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1578:6: branch_false: following 'false' branch (when 'yystate != 2')...
kbd-2.9.0/src/libkeymap/parser.c:1581:3: branch_false: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1593:6: branch_true: following 'true' branch (when 'yyn == -31')...
kbd-2.9.0/src/libkeymap/parser.c:1594:5: branch_true: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1663:6: branch_false: following 'false' branch (when 'yyn != 0')...
kbd-2.9.0/src/libkeymap/parser.c:1665:3: branch_false: ...to here
kbd-2.9.0/src/libkeymap/parser.c:1683:3: danger: use of uninitialized value '*<unknown>' here
# 1681|        unconditionally makes the parser a bit smaller, and it avoids a
# 1682|        GCC warning that YYVAL may be used uninitialized.  */
# 1683|->   yyval = yyvsp[1-yylen];
# 1684|   
# 1685|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def45]
kbd-2.9.0/src/libkfont/context.c:112:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
kbd-2.9.0/src/libkfont/context.c:99:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/context.c:101:16: branch_false: ...to here
kbd-2.9.0/src/libkfont/context.c:111:9: acquire_resource: 'va_start' called here
kbd-2.9.0/src/libkfont/context.c:112:9: throw: if the called function throws an exception...
kbd-2.9.0/src/libkfont/context.c:112:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  110|   	}
#  111|   	va_start(args, fmt);
#  112|-> 	ctx->log_fn(ctx, priority, file, line, fn, fmt, args);
#  113|   	va_end(args);
#  114|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
kbd-2.9.0/src/libkfont/loadunimap.c:298:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/loadunimap.c:307:1: enter_function: entry to 'kfont_save_unicodemap'
kbd-2.9.0/src/libkfont/loadunimap.c:315:20: acquire_resource: opened here
kbd-2.9.0/src/libkfont/loadunimap.c:315:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: call_function: calling 'getunicodemap' from 'kfont_save_unicodemap'
#  296|   getunicodemap(struct kfont_context *ctx, int fd, struct unimapdesc *unimap_descr)
#  297|   {
#  298|-> 	if (kfont_get_unicodemap(ctx, fd, unimap_descr))
#  299|   		return -1;
#  300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
kbd-2.9.0/src/libkfont/loadunimap.c:298:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/loadunimap.c:307:1: enter_function: entry to 'kfont_save_unicodemap'
kbd-2.9.0/src/libkfont/loadunimap.c:315:20: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/loadunimap.c:315:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: call_function: calling 'getunicodemap' from 'kfont_save_unicodemap'
#  296|   getunicodemap(struct kfont_context *ctx, int fd, struct unimapdesc *unimap_descr)
#  297|   {
#  298|-> 	if (kfont_get_unicodemap(ctx, fd, unimap_descr))
#  299|   		return -1;
#  300|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
kbd-2.9.0/src/libkfont/loadunimap.c:301:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/loadunimap.c:307:1: enter_function: entry to 'kfont_save_unicodemap'
kbd-2.9.0/src/libkfont/loadunimap.c:315:20: acquire_resource: opened here
kbd-2.9.0/src/libkfont/loadunimap.c:315:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: call_function: calling 'getunicodemap' from 'kfont_save_unicodemap'
#  299|   		return -1;
#  300|   
#  301|-> 	KFONT_INFO(ctx, P_("# %d entry", "# %d entries", unimap_descr->entry_ct),
#  302|   			unimap_descr->entry_ct);
#  303|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
kbd-2.9.0/src/libkfont/loadunimap.c:301:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/loadunimap.c:307:1: enter_function: entry to 'kfont_save_unicodemap'
kbd-2.9.0/src/libkfont/loadunimap.c:315:20: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/loadunimap.c:315:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/loadunimap.c:320:20: call_function: calling 'getunicodemap' from 'kfont_save_unicodemap'
#  299|   		return -1;
#  300|   
#  301|-> 	KFONT_INFO(ctx, P_("# %d entry", "# %d entries", unimap_descr->entry_ct),
#  302|   			unimap_descr->entry_ct);
#  303|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(omfil, "w")'
kbd-2.9.0/src/libkfont/mapscrn.c:229:19: acquire_resource: opened here
kbd-2.9.0/src/libkfont/mapscrn.c:229:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: throw: if 'getscrnmap' throws an exception...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: danger: 'fopen(omfil, "w")' leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  234|   	havemap = haveumap = 1;
#  235|   
#  236|-> 	if (getscrnmap(ctx, fd, buf))
#  237|   		havemap = 0;
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(omfil, "w")'
kbd-2.9.0/src/libkfont/mapscrn.c:229:19: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/mapscrn.c:229:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: throw: if 'getscrnmap' throws an exception...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: danger: 'fopen(omfil, "w")' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  234|   	havemap = haveumap = 1;
#  235|   
#  236|-> 	if (getscrnmap(ctx, fd, buf))
#  237|   		havemap = 0;
#  238|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(omfil, "w")'
kbd-2.9.0/src/libkfont/mapscrn.c:229:19: acquire_resource: opened here
kbd-2.9.0/src/libkfont/mapscrn.c:229:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: throw: if 'kfont_get_uniscrnmap' throws an exception...
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: danger: 'fopen(omfil, "w")' leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  237|   		havemap = 0;
#  238|   
#  239|-> 	if (kfont_get_uniscrnmap(ctx, fd, ubuf))
#  240|   		haveumap = 0;
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(omfil, "w")'
kbd-2.9.0/src/libkfont/mapscrn.c:229:19: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/mapscrn.c:229:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/mapscrn.c:236:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: throw: if 'kfont_get_uniscrnmap' throws an exception...
kbd-2.9.0/src/libkfont/mapscrn.c:239:13: danger: 'fopen(omfil, "w")' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  237|   		havemap = 0;
#  238|   
#  239|-> 	if (kfont_get_uniscrnmap(ctx, fd, ubuf))
#  240|   		haveumap = 0;
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
kbd-2.9.0/src/libkfont/psffontop.c:162:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/psffontop.c:154:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:155:21: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:155:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:158:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:161:28: branch_false: following 'false' branch (when 'bufp' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:170:22: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:172:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:178:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:178:20: branch_false: following 'false' branch (when 'n <= 4194304')...
kbd-2.9.0/src/libkfont/psffontop.c:178:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:154:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:155:21: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:155:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:158:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:161:28: branch_true: following 'true' branch (when 'bufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:162:33: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:162:33: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:162:33: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  160|   			bufp = realloc(buf, buflth);
#  161|   			if (!bufp) {
#  162|-> 				KFONT_ERR(ctx, "realloc: %m");
#  163|   				ret = -EX_OSERR;
#  164|   				goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
kbd-2.9.0/src/libkfont/psffontop.c:173:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/psffontop.c:154:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:155:21: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:155:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:158:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:161:28: branch_false: following 'false' branch (when 'bufp' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:170:22: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:172:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:173:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:173:25: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:173:25: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  171|   
#  172|   		if (ferror(fontf)) {
#  173|-> 			KFONT_ERR(ctx, _("Error reading input font"));
#  174|   			ret = -EX_DATAERR;
#  175|   			goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
kbd-2.9.0/src/libkfont/psffontop.c:179:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/psffontop.c:154:15: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:155:21: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:155:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:158:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:161:28: branch_false: following 'false' branch (when 'bufp' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:170:22: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:172:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:178:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:178:20: branch_true: following 'true' branch (when 'n > 4194304')...
kbd-2.9.0/src/libkfont/psffontop.c:179:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:179:25: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:179:25: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  177|   
#  178|   		if (n > MAXFONTSIZE) {
#  179|-> 			KFONT_ERR(ctx, _("Font is too big"));
#  180|   			ret = -EX_DATAERR;
#  181|   			goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
kbd-2.9.0/src/libkfont/psffontop.c:213:32: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:213:32: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  211|   	if (fontf) {
#  212|   		if ((ret = read_fontfile(ctx, fontf, &inputbuf, &inputlth)) < 0)
#  213|-> 			return ret;
#  214|   
#  215|   		if (allbufp)

Error: COMPILER_WARNING (CWE-457): [#def58]
kbd-2.9.0/src/libkfont/psffontop.c:231:12: warning[-Wmaybe-uninitialized]: 'inbuflth' may be used uninitialized
#  231 |         if (inputlth >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(inputbuf)) {
#      |            ^
kbd-2.9.0/src/psfxtable.c: scope_hint: In function 'main'
kbd-2.9.0/src/psfxtable.c:46:22: note: 'inbuflth' was declared here
#   46 |         unsigned int inbuflth, fontbuflth;
#      |                      ^
#  229|   	int utf8;
#  230|   
#  231|-> 	if (inputlth >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(inputbuf)) {
#  232|   		struct psf1_header *psfhdr;
#  233|   

Error: COMPILER_WARNING (CWE-457): [#def59]
kbd-2.9.0/src/libkfont/psffontop.c:231:55: warning[-Wmaybe-uninitialized]: 'inbuf' may be used uninitialized
#  231 |         if (inputlth >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(inputbuf)) {
#      |                                                       ^
kbd-2.9.0/src/psfxtable.c: scope_hint: In function 'main'
kbd-2.9.0/src/psfxtable.c:45:24: note: 'inbuf' was declared here
#   45 |         unsigned char *inbuf, *fontbuf;
#      |                        ^
#  229|   	int utf8;
#  230|   
#  231|-> 	if (inputlth >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(inputbuf)) {
#  232|   		struct psf1_header *psfhdr;
#  233|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
kbd-2.9.0/src/libkfont/psffontop.c:237:25: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:231:12: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:236:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:237:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:237:25: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:237:25: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/9)
#  235|   
#  236|   		if (psfhdr->mode > PSF1_MAXMODE) {
#  237|-> 			KFONT_ERR(ctx, _("Unsupported psf file mode (%d)"), psfhdr->mode);
#  238|   			free(psfhdr);
#  239|   			return -EX_DATAERR;

Error: CPPCHECK_WARNING (CWE-590): [#def61]
kbd-2.9.0/src/libkfont/psffontop.c:238: error[autovarInvalidDeallocation]: Deallocation of an auto-variable ([) results in undefined behaviour.
#  236|   		if (psfhdr->mode > PSF1_MAXMODE) {
#  237|   			KFONT_ERR(ctx, _("Unsupported psf file mode (%d)"), psfhdr->mode);
#  238|-> 			free(psfhdr);
#  239|   			return -EX_DATAERR;
#  240|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
kbd-2.9.0/src/libkfont/psffontop.c:255:25: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:248:19: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:254:20: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:255:25: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:255:25: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:255:25: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/9)
#  253|   
#  254|   		if (psfhdr.version > PSF2_MAXVERSION) {
#  255|-> 			KFONT_ERR(ctx, _("Unsupported psf version (%d)"), psfhdr.version);
#  256|   			return -EX_DATAERR;
#  257|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
kbd-2.9.0/src/libkfont/psffontop.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:248:19: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:254:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:258:29: call_function: inlined call to 'assemble_uint32' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:270:12: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/psffontop.c:271:17: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:271:17: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:271:17: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9)
#  269|   	/* tests required - we divide by these */
#  270|   	if (fontlen == 0) {
#  271|-> 		KFONT_ERR(ctx, _("zero input font length?"));
#  272|   		return -EX_DATAERR;
#  273|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
kbd-2.9.0/src/libkfont/psffontop.c:275:17: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:236:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:236:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:274:12: branch_true: following 'true' branch (when 'charsize == 0')...
kbd-2.9.0/src/libkfont/psffontop.c:275:17: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:275:17: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:275:17: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/9)
#  273|   	}
#  274|   	if (charsize == 0) {
#  275|-> 		KFONT_ERR(ctx, _("zero input character size?"));
#  276|   		return -EX_DATAERR;
#  277|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
kbd-2.9.0/src/libkfont/psffontop.c:288:17: warning[-Wanalyzer-malloc-leak]: leak of 'inputbuf'
kbd-2.9.0/src/libkfont/psffontop.c:195:1: enter_function: entry to 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:211:12: branch_true: following 'true' branch (when 'fontf' is non-NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:212:28: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:212:28: call_function: calling 'read_fontfile' from 'kfont_read_psffont'
kbd-2.9.0/src/libkfont/psffontop.c:212:28: return_function: returning to 'kfont_read_psffont' from 'read_fontfile'
kbd-2.9.0/src/libkfont/psffontop.c:212:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:215:20: branch_false: following 'false' branch (when 'allbufp' is NULL)...
kbd-2.9.0/src/libkfont/psffontop.c:217:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:236:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/psffontop.c:236:20: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:274:12: branch_false: following 'false' branch (when 'charsize != 0')...
kbd-2.9.0/src/libkfont/psffontop.c:279:12: branch_false: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:279:12: branch_true: following 'true' branch (when 'fontheight == 0')...
kbd-2.9.0/src/libkfont/psffontop.c:281:29: branch_true: ...to here
kbd-2.9.0/src/libkfont/psffontop.c:288:17: throw: if 'logger' throws an exception...
kbd-2.9.0/src/libkfont/psffontop.c:288:17: danger: 'inputbuf' leaks here; was allocated at [(10)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/9)
#  286|   
#  287|   	if (i > inputlth || (!hastable && i != inputlth)) {
#  288|-> 		KFONT_ERR(ctx, _("Input file: bad input length (%d)"), inputlth);
#  289|   		return -EX_DATAERR;
#  290|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
kbd-2.9.0/src/libkfont/setfont.c:142:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  140|   
#  141|   		if (bad_video_erase_char) {
#  142|-> 			KFONT_ERR(ctx, _("font position 32 is nonblank"));
#  143|   
#  144|   			switch (erase_mode) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
kbd-2.9.0/src/libkfont/setfont.c:154:41: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  152|   					break;
#  153|   				case 1:
#  154|-> 					KFONT_ERR(ctx, _("background will look funny"));
#  155|   					break;
#  156|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
kbd-2.9.0/src/libkfont/setfont.c:157:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  155|   					break;
#  156|   			}
#  157|-> 			sleep(2);
#  158|   		}
#  159|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
kbd-2.9.0/src/libkfont/setfont.c:162:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  160|   
#  161|   	if (height == hwunit && filename)
#  162|-> 		KFONT_INFO(ctx, _("Loading %d-char %dx%d font from file %s"),
#  163|   		       fontsize, width, height, filename);
#  164|   	else if (height == hwunit)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
kbd-2.9.0/src/libkfont/setfont.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  163|   		       fontsize, width, height, filename);
#  164|   	else if (height == hwunit)
#  165|-> 		KFONT_INFO(ctx, _("Loading %d-char %dx%d font"),
#  166|   		       fontsize, width, height);
#  167|   	else if (filename)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
kbd-2.9.0/src/libkfont/setfont.c:168:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  166|   		       fontsize, width, height);
#  167|   	else if (filename)
#  168|-> 		KFONT_INFO(ctx, _("Loading %d-char %dx%d (%d) font from file %s"),
#  169|   		       fontsize, width, height, hwunit, filename);
#  170|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
kbd-2.9.0/src/libkfont/setfont.c:171:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  169|   		       fontsize, width, height, hwunit, filename);
#  170|   	else
#  171|-> 		KFONT_INFO(ctx, _("Loading %d-char %dx%d (%d) font"),
#  172|   		       fontsize, width, height, hwunit);
#  173|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
kbd-2.9.0/src/libkfont/setfont.c:174:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
kbd-2.9.0/src/libkfont/setfont.c:390:1: enter_function: entry to 'kfont_load_font'
kbd-2.9.0/src/libkfont/setfont.c:403:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:408:14: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:434:20: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:441:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:450:14: branch_true: following 'true' branch...
kbd-2.9.0/src/libkfont/setfont.c:461:23: call_function: calling 'do_loadfont' from 'kfont_load_font'
#  172|   		       fontsize, width, height, hwunit);
#  173|   
#  174|-> 	if (kfont_put_font(ctx, fd, buf, fontsize, width, hwunit, vpitch) < 0) {
#  175|   		ret = -EX_OSERR;
#  176|   		goto err;

Error: CPPCHECK_WARNING (CWE-457): [#def74]
kbd-2.9.0/src/libkfont/setfont.c:511: warning[uninitvar]: Uninitialized variable: ifiles
#  509|   
#  510|   			/* recursive call */
#  511|-> 			ret = kfont_load_fonts(ctx, fd, ifiles, ifilct, iunit,
#  512|   				hwunit, no_m, no_u);
#  513|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
kbd-2.9.0/src/libkfont/setfont.c:616:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/setfont.c:668:1: enter_function: entry to 'kfont_save_font'
kbd-2.9.0/src/libkfont/setfont.c:672:21: acquire_resource: opened here
kbd-2.9.0/src/libkfont/setfont.c:674:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:679:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:682:15: call_function: calling 'save_font' from 'kfont_save_font'
#  614|   	ct = sizeof(buf) / (64 * 128 / 8); /* max size 64x128, 8 bits/byte */
#  615|   
#  616|-> 	if (kfont_get_font(ctx, consolefd, buf, &ct, &width, &height, &vpitch) < 0)
#  617|   		return -EX_OSERR;
#  618|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
kbd-2.9.0/src/libkfont/setfont.c:616:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/setfont.c:668:1: enter_function: entry to 'kfont_save_font'
kbd-2.9.0/src/libkfont/setfont.c:672:21: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/setfont.c:674:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:679:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:682:15: call_function: calling 'save_font' from 'kfont_save_font'
#  614|   	ct = sizeof(buf) / (64 * 128 / 8); /* max size 64x128, 8 bits/byte */
#  615|   
#  616|-> 	if (kfont_get_font(ctx, consolefd, buf, &ct, &width, &height, &vpitch) < 0)
#  617|   		return -EX_OSERR;
#  618|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
kbd-2.9.0/src/libkfont/setfont.c:620:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/setfont.c:668:1: enter_function: entry to 'kfont_save_font'
kbd-2.9.0/src/libkfont/setfont.c:672:21: acquire_resource: opened here
kbd-2.9.0/src/libkfont/setfont.c:674:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:679:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:682:15: call_function: calling 'save_font' from 'kfont_save_font'
#  618|   
#  619|   	/* save as efficiently as possible */
#  620|-> 	if (!height)
#  621|   		height = font_charheight(buf, ct, width);
#  622|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
kbd-2.9.0/src/libkfont/setfont.c:620:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "w")'
kbd-2.9.0/src/libkfont/setfont.c:668:1: enter_function: entry to 'kfont_save_font'
kbd-2.9.0/src/libkfont/setfont.c:672:21: acquire_memory: allocated here
kbd-2.9.0/src/libkfont/setfont.c:674:12: branch_false: following 'false' branch...
kbd-2.9.0/src/libkfont/setfont.c:679:13: branch_false: ...to here
kbd-2.9.0/src/libkfont/setfont.c:682:15: call_function: calling 'save_font' from 'kfont_save_font'
#  618|   
#  619|   	/* save as efficiently as possible */
#  620|-> 	if (!height)
#  621|   		height = font_charheight(buf, ct, width);
#  622|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
kbd-2.9.0/src/openvt.c:106:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
kbd-2.9.0/src/openvt.c:97:20: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:97:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:102:9: branch_false: ...to here
kbd-2.9.0/src/openvt.c:103:12: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:104:29: branch_true: ...to here
kbd-2.9.0/src/openvt.c:106:20: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  104|   		int errsv = errno;
#  105|   		sprintf(filename, VTNAME2, curvt);
#  106|-> 		if (stat(filename, &buf)) {
#  107|   			/* give error message for first attempt */
#  108|   			sprintf(filename, VTNAME, curvt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
kbd-2.9.0/src/openvt.c:117:12: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
kbd-2.9.0/src/openvt.c:97:20: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:97:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:102:9: branch_false: ...to here
kbd-2.9.0/src/openvt.c:117:12: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  115|   
#  116|   	/* get the owner of current tty */
#  117|-> 	if (!(pwnam = getpwuid(console_uid)))
#  118|   		kbd_error(EXIT_FAILURE, errno, "getpwuid");
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
kbd-2.9.0/src/openvt.c:117:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
kbd-2.9.0/src/openvt.c:97:20: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:97:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:102:9: branch_false: ...to here
kbd-2.9.0/src/openvt.c:117:23: throw: if ‘getpwuid’ throws an exception...
kbd-2.9.0/src/openvt.c:117:23: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  115|   
#  116|   	/* get the owner of current tty */
#  117|-> 	if (!(pwnam = getpwuid(console_uid)))
#  118|   		kbd_error(EXIT_FAILURE, errno, "getpwuid");
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
kbd-2.9.0/src/openvt.c:122:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
kbd-2.9.0/src/openvt.c:97:20: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:97:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:102:9: branch_false: ...to here
kbd-2.9.0/src/openvt.c:117:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:117:12: branch_false: ...to here
kbd-2.9.0/src/openvt.c:122:25: throw: if ‘readdir’ throws an exception...
kbd-2.9.0/src/openvt.c:122:25: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  120|   	/* check to make sure that user has a process on that tty */
#  121|   	/* this will fail for example when X is running on the tty */
#  122|-> 	while ((dentp = readdir(dp))) {
#  123|   		sprintf(filename, "/proc/%s/fd/0", dentp->d_name);
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
kbd-2.9.0/src/openvt.c:323:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
kbd-2.9.0/src/openvt.c:320:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
kbd-2.9.0/src/openvt.c:323:21: branch_true: ...to here
kbd-2.9.0/src/openvt.c:323:20: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:323:44: branch_true: ...to here
kbd-2.9.0/src/openvt.c:323:44: acquire_resource: opened here
kbd-2.9.0/src/openvt.c:323:21: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  321|   		struct stat st;
#  322|   
#  323|-> 		if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1)
#  324|   			kbd_error(EXIT_FAILURE, errno, "open(/dev/null)");
#  325|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
kbd-2.9.0/src/openvt.c:388:33: warning[-Wanalyzer-malloc-leak]: leak of ‘cmd’
kbd-2.9.0/src/openvt.c:320:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
kbd-2.9.0/src/openvt.c:323:21: branch_true: ...to here
kbd-2.9.0/src/openvt.c:327:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:330:13: branch_false: ...to here
kbd-2.9.0/src/openvt.c:330:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:333:13: branch_false: ...to here
kbd-2.9.0/src/openvt.c:333:12: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:334:21: branch_true: ...to here
kbd-2.9.0/src/openvt.c:334:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:347:12: branch_false: following ‘false’ branch (when ‘as_user == 0’)...
kbd-2.9.0/src/openvt.c:350:21: branch_false: ...to here
kbd-2.9.0/src/openvt.c:350:20: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:351:35: branch_true: ...to here
kbd-2.9.0/src/openvt.c:352:28: branch_false: following ‘false’ branch (when ‘def_cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:354:38: branch_false: ...to here
kbd-2.9.0/src/openvt.c:354:31: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:359:20: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:362:20: branch_false: ...to here
kbd-2.9.0/src/openvt.c:367:20: branch_true: following ‘true’ branch (when ‘def_cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:368:25: branch_true: ...to here
kbd-2.9.0/src/openvt.c:372:20: branch_false: following ‘false’ branch (when ‘login == 0’)...
kbd-2.9.0/src/openvt.c:376:12: branch_false: ...to here
kbd-2.9.0/src/openvt.c:376:12: branch_false: following ‘false’ branch (when ‘direct_exec == 0’)...
kbd-2.9.0/src/openvt.c:376:36: branch_false: ...to here
kbd-2.9.0/src/openvt.c:376:13: branch_true: following ‘true’ branch (when ‘pid == 0’)...
kbd-2.9.0/src/openvt.c:386:29: branch_true: ...to here
kbd-2.9.0/src/openvt.c:386:28: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:388:53: branch_true: ...to here
kbd-2.9.0/src/openvt.c:388:33: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/openvt.c:388:33: danger: ‘cmd’ leaks here; was allocated at [(17)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/16)
#  386|   			if (setsid() < 0)
#  387|   #endif /* ESIX_5_3_2_D */
#  388|-> 				kbd_error(5, errno, _("Unable to set new session"));
#  389|   		}
#  390|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
kbd-2.9.0/src/openvt.c:457:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cmd’
kbd-2.9.0/src/openvt.c:320:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
kbd-2.9.0/src/openvt.c:323:21: branch_true: ...to here
kbd-2.9.0/src/openvt.c:327:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:330:13: branch_false: ...to here
kbd-2.9.0/src/openvt.c:330:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:333:13: branch_false: ...to here
kbd-2.9.0/src/openvt.c:333:12: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:334:21: branch_true: ...to here
kbd-2.9.0/src/openvt.c:334:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:347:12: branch_false: following ‘false’ branch (when ‘as_user == 0’)...
kbd-2.9.0/src/openvt.c:350:21: branch_false: ...to here
kbd-2.9.0/src/openvt.c:350:20: branch_true: following ‘true’ branch...
kbd-2.9.0/src/openvt.c:351:35: branch_true: ...to here
kbd-2.9.0/src/openvt.c:352:28: branch_false: following ‘false’ branch (when ‘def_cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:354:38: branch_false: ...to here
kbd-2.9.0/src/openvt.c:354:31: acquire_memory: allocated here
kbd-2.9.0/src/openvt.c:359:20: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:362:20: branch_false: ...to here
kbd-2.9.0/src/openvt.c:367:20: branch_true: following ‘true’ branch (when ‘def_cmd’ is non-NULL)...
kbd-2.9.0/src/openvt.c:368:25: branch_true: ...to here
kbd-2.9.0/src/openvt.c:372:20: branch_false: following ‘false’ branch (when ‘login == 0’)...
kbd-2.9.0/src/openvt.c:376:12: branch_false: ...to here
kbd-2.9.0/src/openvt.c:376:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/openvt.c:456:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
kbd-2.9.0/src/openvt.c:457:30: branch_true: ...to here
kbd-2.9.0/src/openvt.c:457:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/openvt.c:457:17: danger: ‘cmd’ leaks here; was allocated at [(17)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/16)
#  455|   
#  456|   	if (pid < 0)
#  457|-> 		kbd_error(6, errno, "fork");
#  458|   
#  459|   	if (do_wait) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
kbd-2.9.0/src/psfxtable.c:127:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:63:12: branch_true: following ‘true’ branch (when the strings are equal)...
kbd-2.9.0/src/psfxtable.c:65:20: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:65:20: branch_false: following ‘false’ branch (when ‘argc == 4’)...
kbd-2.9.0/src/psfxtable.c:70:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_resource: opened here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: following ‘false’ branch (when ‘itname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:124:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:124:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:126:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:126:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:127:42: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:127:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:127:17: danger: ‘ifil’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  125|   		itab = stdin;
#  126|   	else if (!(itab = fopen(itname, "r")))
#  127|-> 		kbd_error(EX_NOINPUT, 0, _("Unable to open file: %s: %m"), itname);
#  128|   
#  129|   	/* Refuse ifil == itab == stdin ? Perhaps not. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
kbd-2.9.0/src/psfxtable.c:127:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:63:12: branch_true: following ‘true’ branch (when the strings are equal)...
kbd-2.9.0/src/psfxtable.c:65:20: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:65:20: branch_false: following ‘false’ branch (when ‘argc == 4’)...
kbd-2.9.0/src/psfxtable.c:70:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_memory: allocated here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: following ‘false’ branch (when ‘itname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:124:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:124:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:126:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:126:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:127:42: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:127:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:127:17: danger: ‘ifil’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  125|   		itab = stdin;
#  126|   	else if (!(itab = fopen(itname, "r")))
#  127|-> 		kbd_error(EX_NOINPUT, 0, _("Unable to open file: %s: %m"), itname);
#  128|   
#  129|   	/* Refuse ifil == itab == stdin ? Perhaps not. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
kbd-2.9.0/src/psfxtable.c:136:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:65:20: branch_false: following ‘false’ branch (when ‘argc == 4’)...
kbd-2.9.0/src/psfxtable.c:70:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_resource: opened here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:131:12: branch_false: following ‘false’ branch (when ‘ofname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:133:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:133:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:135:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:135:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:136:44: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:136:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:136:17: danger: ‘ifil’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  134|   		ofil = stdout;
#  135|   	else if (!(ofil = fopen(ofname, "w")))
#  136|-> 		kbd_error(EX_CANTCREAT, 0, _("Unable to open file: %s: %m"), ofname);
#  137|   
#  138|   	if (!otname)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
kbd-2.9.0/src/psfxtable.c:136:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:65:20: branch_false: following ‘false’ branch (when ‘argc == 4’)...
kbd-2.9.0/src/psfxtable.c:70:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_memory: allocated here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:131:12: branch_false: following ‘false’ branch (when ‘ofname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:133:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:133:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:135:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:135:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:136:44: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:136:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:136:17: danger: ‘ifil’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  134|   		ofil = stdout;
#  135|   	else if (!(ofil = fopen(ofname, "w")))
#  136|-> 		kbd_error(EX_CANTCREAT, 0, _("Unable to open file: %s: %m"), ofname);
#  137|   
#  138|   	if (!otname)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
kbd-2.9.0/src/psfxtable.c:143:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:63:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:73:21: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:73:19: branch_true: following ‘true’ branch (when the strings are equal)...
kbd-2.9.0/src/psfxtable.c:74:21: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:74:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:79:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_resource: opened here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:122:12: branch_true: following ‘true’ branch (when ‘itname’ is NULL)...
kbd-2.9.0/src/psfxtable.c:131:12: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:131:12: branch_true: following ‘true’ branch (when ‘ofname’ is NULL)...
kbd-2.9.0/src/psfxtable.c:138:12: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:138:12: branch_false: following ‘false’ branch (when ‘otname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:140:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:140:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:142:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:142:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:143:44: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:143:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:143:17: danger: ‘ifil’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  141|   		otab = stdout;
#  142|   	else if (!(otab = fopen(otname, "w")))
#  143|-> 		kbd_error(EX_CANTCREAT, 0, _("Unable to open file: %s: %m"), otname);
#  144|   
#  145|   	if (kfont_read_psffont(kfont, ifil, &inbuf, &inbuflth, &fontbuf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
kbd-2.9.0/src/psfxtable.c:143:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ifil’
kbd-2.9.0/src/psfxtable.c:60:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:63:14: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:63:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:73:21: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:73:19: branch_true: following ‘true’ branch (when the strings are equal)...
kbd-2.9.0/src/psfxtable.c:74:21: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:74:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:79:17: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:117:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:119:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:119:27: acquire_memory: allocated here
kbd-2.9.0/src/psfxtable.c:119:17: branch_false: following ‘false’ branch...
kbd-2.9.0/src/psfxtable.c:122:12: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:122:12: branch_true: following ‘true’ branch (when ‘itname’ is NULL)...
kbd-2.9.0/src/psfxtable.c:131:12: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:131:12: branch_true: following ‘true’ branch (when ‘ofname’ is NULL)...
kbd-2.9.0/src/psfxtable.c:138:12: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:138:12: branch_false: following ‘false’ branch (when ‘otname’ is non-NULL)...
kbd-2.9.0/src/psfxtable.c:140:19: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:140:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/psfxtable.c:142:27: branch_false: ...to here
kbd-2.9.0/src/psfxtable.c:142:17: branch_true: following ‘true’ branch...
kbd-2.9.0/src/psfxtable.c:143:44: branch_true: ...to here
kbd-2.9.0/src/psfxtable.c:143:17: throw: if ‘kbd_error’ throws an exception...
kbd-2.9.0/src/psfxtable.c:143:17: danger: ‘ifil’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  141|   		otab = stdout;
#  142|   	else if (!(otab = fopen(otname, "w")))
#  143|-> 		kbd_error(EX_CANTCREAT, 0, _("Unable to open file: %s: %m"), otname);
#  144|   
#  145|   	if (kfont_read_psffont(kfont, ifil, &inbuf, &inbuflth, &fontbuf,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
kbd-2.9.0/src/setvtrgb.c:126:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_resource: opened here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  124|   parse_file(FILE *fd, const char *filename)
#  125|   {
#  126|-> 	int c = fgetc(fd);
#  127|   
#  128|   	if (c == EOF)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
kbd-2.9.0/src/setvtrgb.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_memory: allocated here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  124|   parse_file(FILE *fd, const char *filename)
#  125|   {
#  126|-> 	int c = fgetc(fd);
#  127|   
#  128|   	if (c == EOF)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def94]
kbd-2.9.0/src/setvtrgb.c:129:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_resource: opened here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  127|   
#  128|   	if (c == EOF)
#  129|-> 		kbd_error(EXIT_FAILURE, 0, _("Error: %s: File ended unexpectedly."),
#  130|   		          filename);
#  131|   	ungetc(c, fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
kbd-2.9.0/src/setvtrgb.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_memory: allocated here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  127|   
#  128|   	if (c == EOF)
#  129|-> 		kbd_error(EXIT_FAILURE, 0, _("Error: %s: File ended unexpectedly."),
#  130|   		          filename);
#  131|   	ungetc(c, fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def96]
kbd-2.9.0/src/setvtrgb.c:131:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_resource: opened here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  129|   		kbd_error(EXIT_FAILURE, 0, _("Error: %s: File ended unexpectedly."),
#  130|   		          filename);
#  131|-> 	ungetc(c, fd);
#  132|   
#  133|   	if (c == '#')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
kbd-2.9.0/src/setvtrgb.c:131:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
kbd-2.9.0/src/setvtrgb.c:139:5: enter_function: entry to ‘main’
kbd-2.9.0/src/setvtrgb.c:182:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:185:20: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:187:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:190:21: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:190:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
kbd-2.9.0/src/setvtrgb.c:194:26: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:194:26: acquire_memory: allocated here
kbd-2.9.0/src/setvtrgb.c:194:20: branch_false: following ‘false’ branch...
kbd-2.9.0/src/setvtrgb.c:197:17: branch_false: ...to here
kbd-2.9.0/src/setvtrgb.c:197:17: call_function: calling ‘parse_file’ from ‘main’
#  129|   		kbd_error(EXIT_FAILURE, 0, _("Error: %s: File ended unexpectedly."),
#  130|   		          filename);
#  131|-> 	ungetc(c, fd);
#  132|   
#  133|   	if (c == '#')

Error: GCC_ANALYZER_WARNING (CWE-479): [#def98]
kbd-2.9.0/src/showkey.c:74:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler
kbd-2.9.0/src/showkey.c:97:5: enter_function: entry to ‘main’
kbd-2.9.0/src/showkey.c:160:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:163:12: branch_false: ...to here
kbd-2.9.0/src/showkey.c:163:12: branch_false: following ‘false’ branch (when ‘print_ascii == 0’)...
kbd-2.9.0/src/showkey.c:197:19: branch_false: ...to here
kbd-2.9.0/src/showkey.c:197:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:201:9: branch_false: ...to here
kbd-2.9.0/src/showkey.c:74:9: danger: call to ‘printf’ from within signal handler
#   72|   die(int x)
#   73|   {
#   74|-> 	printf(_("caught signal %d, cleaning up...\n"), x);
#   75|   	clean_up();
#   76|   	exit(EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def99]
kbd-2.9.0/src/showkey.c:76:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
kbd-2.9.0/src/showkey.c:97:5: enter_function: entry to ‘main’
kbd-2.9.0/src/showkey.c:160:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:163:12: branch_false: ...to here
kbd-2.9.0/src/showkey.c:163:12: branch_false: following ‘false’ branch (when ‘print_ascii == 0’)...
kbd-2.9.0/src/showkey.c:197:19: branch_false: ...to here
kbd-2.9.0/src/showkey.c:197:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:201:9: branch_false: ...to here
kbd-2.9.0/src/showkey.c:75:9: call_function: calling ‘clean_up’ from ‘die’
kbd-2.9.0/src/showkey.c:75:9: return_function: returning to ‘die’ from ‘clean_up’
kbd-2.9.0/src/showkey.c:76:9: danger: call to ‘exit’ from within signal handler
#   74|   	printf(_("caught signal %d, cleaning up...\n"), x);
#   75|   	clean_up();
#   76|-> 	exit(EXIT_FAILURE);
#   77|   }
#   78|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def100]
kbd-2.9.0/src/showkey.c:83:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
kbd-2.9.0/src/showkey.c:97:5: enter_function: entry to ‘main’
kbd-2.9.0/src/showkey.c:160:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:163:12: branch_false: ...to here
kbd-2.9.0/src/showkey.c:163:12: branch_false: following ‘false’ branch (when ‘print_ascii == 0’)...
kbd-2.9.0/src/showkey.c:197:19: branch_false: ...to here
kbd-2.9.0/src/showkey.c:197:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/showkey.c:201:9: branch_false: ...to here
kbd-2.9.0/src/showkey.c:80:1: enter_function: entry to ‘watch_dog’
kbd-2.9.0/src/showkey.c:82:9: call_function: calling ‘clean_up’ from ‘watch_dog’
kbd-2.9.0/src/showkey.c:82:9: return_function: returning to ‘watch_dog’ from ‘clean_up’
kbd-2.9.0/src/showkey.c:83:9: danger: call to ‘exit’ from within signal handler
#   81|   {
#   82|   	clean_up();
#   83|-> 	exit(EXIT_SUCCESS);
#   84|   }
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
kbd-2.9.0/src/vlock/username.c:63:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
kbd-2.9.0/src/vlock/username.c:56:12: branch_false: following ‘false’ branch...
kbd-2.9.0/src/vlock/username.c:59:23: branch_false: ...to here
kbd-2.9.0/src/vlock/username.c:59:16: acquire_memory: allocated here
kbd-2.9.0/src/vlock/username.c:60:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
kbd-2.9.0/src/vlock/username.c:63:9: branch_false: ...to here
kbd-2.9.0/src/vlock/username.c:63:9: throw: if ‘endpwent’ throws an exception...
kbd-2.9.0/src/vlock/username.c:63:9: danger: ‘name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   61|   		kbd_error(EXIT_FAILURE, errno, "strdup");
#   62|   
#   63|-> 	endpwent();
#   64|   	return name;
#   65|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:14:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:19:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:24:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: acquire_resource: opened here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: danger: ‘fopen(argv[1], "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   25|   
#   26|   	kbdfile_set_pathname(fp, argv[1]);
#   27|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   28|   
#   29|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:14:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:19:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:24:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: acquire_memory: allocated here
kbd-2.9.0/tests/helpers/libkeymap-bkeymap.c:27:9: danger: ‘fopen(argv[1], "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   25|   
#   26|   	kbdfile_set_pathname(fp, argv[1]);
#   27|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   28|   
#   29|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:17:12: branch_false: following ‘false’ branch (when ‘argc != 1’)...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:22:28: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:22:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:27:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:27:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:32:14: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: acquire_resource: opened here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: danger: ‘fopen(argv[1], "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   45|   
#   46|   	kbdfile_set_pathname(fp, argv[1]);
#   47|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   48|   
#   49|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:17:12: branch_false: following ‘false’ branch (when ‘argc != 1’)...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:22:28: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:22:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:27:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:27:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:32:14: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: acquire_memory: allocated here
kbd-2.9.0/tests/helpers/libkeymap-dumpkeys.c:47:9: danger: ‘fopen(argv[1], "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   45|   
#   46|   	kbdfile_set_pathname(fp, argv[1]);
#   47|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   48|   
#   49|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def106]
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:15:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:20:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:25:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: acquire_resource: opened here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: danger: ‘fopen(argv[1], "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   26|   
#   27|   	kbdfile_set_pathname(fp, argv[1]);
#   28|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   29|   
#   30|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:15:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:20:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:25:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: acquire_memory: allocated here
kbd-2.9.0/tests/helpers/libkeymap-mktable.c:28:9: danger: ‘fopen(argv[1], "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   26|   
#   27|   	kbdfile_set_pathname(fp, argv[1]);
#   28|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   29|   
#   30|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def108]
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:16:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:21:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:21:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: acquire_resource: opened here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: danger: ‘fopen(argv[1], "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   27|   
#   28|   	kbdfile_set_pathname(fp, argv[1]);
#   29|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   30|   
#   31|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "r")’
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:16:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:21:19: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:21:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: acquire_memory: allocated here
kbd-2.9.0/tests/helpers/libkeymap-showmaps.c:29:9: danger: ‘fopen(argv[1], "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   27|   
#   28|   	kbdfile_set_pathname(fp, argv[1]);
#   29|-> 	kbdfile_set_file(fp, fopen(argv[1], "r"));
#   30|   
#   31|   	lk_parse_keymap(ctx, fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def110]
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/charset-keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:31:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/charset-keymap0.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/charset-keymap0.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/charset-keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:31:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test01.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/charset-keymap0.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/charset-keymap0.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/dev/null", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:26:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:28:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:29:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: danger: ‘fopen("/dev/null", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   30|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: /dev/null: %s", strerror(errno));
#   31|   
#   32|-> 	kbdfile_set_file(fp, f);
#   33|   
#   34|   	ctx = lk_init();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/dev/null", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:26:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:28:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:29:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test02.c:32:9: danger: ‘fopen("/dev/null", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   30|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: /dev/null: %s", strerror(errno));
#   31|   
#   32|-> 	kbdfile_set_file(fp, f);
#   33|   
#   34|   	ctx = lk_init();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:45:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:48:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:49:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:52:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:57:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:58:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   59|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap0.map: %s", strerror(errno));
#   60|   
#   61|-> 	kbdfile_set_file(fp, f);
#   62|   
#   63|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:45:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:48:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:49:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:52:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:57:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:58:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test05.c:61:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   59|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap0.map: %s", strerror(errno));
#   60|   
#   61|-> 	kbdfile_set_file(fp, f);
#   62|   
#   63|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def116]
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap1.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:31:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap1.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap1.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if(lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap1.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:31:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test06.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap1.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap1.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if(lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap2.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:31:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:32:11: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap2.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap2.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap2.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:31:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:32:11: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test07.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap2.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap2.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap3.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:23:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:24:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:27:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:32:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:33:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap3.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   34|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "data/libkeymap/keymap3.map: %s", strerror(errno));
#   35|   
#   36|-> 	kbdfile_set_file(fp, f);
#   37|   
#   38|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap3.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:23:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:24:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:27:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:32:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:33:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test08.c:36:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap3.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   34|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "data/libkeymap/keymap3.map: %s", strerror(errno));
#   35|   
#   36|-> 	kbdfile_set_file(fp, f);
#   37|   
#   38|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap4.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:21:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:24:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:25:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:28:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:33:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:34:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap4.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   35|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap4.map: %s", strerror(errno));
#   36|   
#   37|-> 	kbdfile_set_file(fp, f);
#   38|   
#   39|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap4.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:21:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:24:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:25:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:28:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:33:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:34:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test09.c:37:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap4.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   35|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap4.map: %s", strerror(errno));
#   36|   
#   37|-> 	kbdfile_set_file(fp, f);
#   38|   
#   39|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap5.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:23:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:24:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:27:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:32:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:33:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap5.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   34|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap5.map: %s", strerror(errno));
#   35|   
#   36|-> 	kbdfile_set_file(fp, f);
#   37|   
#   38|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap5.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:20:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:23:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:24:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:27:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:32:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:33:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test10.c:36:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap5.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   34|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap5.map: %s", strerror(errno));
#   35|   
#   36|-> 	kbdfile_set_file(fp, f);
#   37|   
#   38|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap6.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:31:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap6.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap6.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap6.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:31:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test11.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap6.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap6.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:18:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:21:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:22:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:25:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:30:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:31:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: throw: if ‘kbdfile_set_file’ throws an exception...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   32|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap0.map: %s", strerror(errno));
#   33|   
#   34|-> 	kbdfile_set_file(fp, f);
#   35|   
#   36|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:18:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:21:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:22:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:25:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:30:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:31:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: throw: if ‘kbdfile_set_file’ throws an exception...
kbd-2.9.0/tests/libkeymap/libkeymap-test19.c:34:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap0.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   32|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap0.map: %s", strerror(errno));
#   33|   
#   34|-> 	kbdfile_set_file(fp, f);
#   35|   
#   36|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap7.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:31:13: acquire_resource: opened here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap7.map", "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap7.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap7.map", "r")’
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:19:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:22:14: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:23:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:26:15: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:31:13: acquire_memory: allocated here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:32:12: branch_false: following ‘false’ branch...
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: branch_false: ...to here
kbd-2.9.0/tests/libkeymap/libkeymap-test20.c:35:9: danger: ‘fopen("/builddir/build/BUILD/kbd-2.9.0/tests/data/libkeymap/keymap7.map", "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   33|   		kbd_error(EXIT_FAILURE, 0, "Unable to open: " TESTDIR "/data/libkeymap/keymap7.map: %s", strerror(errno));
#   34|   
#   35|-> 	kbdfile_set_file(fp, f);
#   36|   
#   37|   	if (lk_parse_keymap(ctx, fp) != 0)

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-241.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-namekbd-2.9.0-1.fc44
store-results-to/tmp/tmpree4an_x/kbd-2.9.0-1.fc44.tar.xz
time-created2026-01-08 17:33:36
time-finished2026-01-08 17:36:21
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpree4an_x/kbd-2.9.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpree4an_x/kbd-2.9.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9