e2fsprogs-1.47.3-3.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-398): [#def1]
/usr/bin/compile_et:23:49: warning[SC2163]: This does not export 'as_var'. Remove $/${} for that, or use ${var?} to quiet.
#   21|     LC_TELEPHONE LC_TIME
#   22|   do
#   23|->   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
#   24|       eval $as_var=C; export $as_var
#   25|     else

Error: SHELLCHECK_WARNING (CWE-398): [#def2]
/usr/bin/compile_et:24:28: warning[SC2163]: This does not export 'as_var'. Remove $/${} for that, or use ${var?} to quiet.
#   22|   do
#   23|     if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
#   24|->     eval $as_var=C; export $as_var
#   25|     else
#   26|       $as_unset $as_var

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/bin/compile_et:26:5: warning[SC2154]: as_unset is referenced but not assigned.
#   24|       eval $as_var=C; export $as_var
#   25|     else
#   26|->     $as_unset $as_var
#   27|     fi
#   28|   done

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/e2scrub:69:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   67|   	# fail service uses the service name to gather log messages for the
#   68|   	# error report.
#   69|-> 	if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
#   70|   		test "${ret}" -ne 0 && ret=1
#   71|   		sleep 2

Error: SHELLCHECK_WARNING (CWE-571): [#def5]
/usr/bin/e2scrub:109:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  107|   # Find the device for a given mountpoint
#  108|   dev_from_mount() {
#  109|-> 	local mountpt="$(realpath "$1")"
#  110|   
#  111|   	lsblk -o NAME,FSTYPE,MOUNTPOINT -p -P -n 2> /dev/null | while read vars; do

Error: SHELLCHECK_WARNING (CWE-571): [#def6]
/usr/bin/e2scrub:129:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  127|   dev_from_arg() {
#  128|   	local dev="$1"
#  129|-> 	local fstype="$(lsblk -o FSTYPE -n "${dev}" 2> /dev/null)"
#  130|   
#  131|   	case "${fstype}" in

Error: SHELLCHECK_WARNING: [#def7]
/usr/bin/e2scrub:185:35: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
#  183|   	# Remove and wait for removal to succeed.
#  184|   	${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}"
#  185|-> 	while [ -e "${snap_dev}" ] && [ "$?" -eq "5" ]; do
#  186|   		sleep 0.5
#  187|   		${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}"

Error: SHELLCHECK_WARNING: [#def8]
/usr/bin/e2scrub:213:35: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
#  211|   	lvremove_deadline="$(( $(date "+%s") + 30))"
#  212|   	${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}" 2>/dev/null
#  213|-> 	while [ -e "${snap_dev}" ] && [ "$?" -eq "5" ] &&
#  214|   	      [ "$(date "+%s")" -lt "${lvremove_deadline}" ]; do
#  215|   		sleep 0.5

Error: SHELLCHECK_WARNING (CWE-477): [#def9]
/usr/bin/e2scrub_all:59:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   57|   	# actually happened.
#   58|   
#   59|-> 	if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
#   60|   		test "${ret}" -ne 0 && ret=1
#   61|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def10]
/usr/bin/e2scrub_all:78:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   76|   
#   77|   # If we're in service mode and the service is not enabled via config file...
#   78|-> if [ -n "${SERVICE_MODE}" -a "${periodic_e2scrub}" -ne 1 ]; then
#   79|   	# ...don't start e2scrub processes.
#   80|   	if [ "${reap}" -eq 0 ]; then

Error: SHELLCHECK_WARNING (CWE-571): [#def11]
/usr/bin/e2scrub_all:118:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  116|   # Find scrub targets, make sure we only do this once.
#  117|   ls_scan_targets() {
#  118|->     local devices=$(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>=${snap_size_mb}")
#  119|   
#  120|       if [ -z "$devices" ]; then

Error: SHELLCHECK_WARNING (CWE-456): [#def12]
/usr/bin/mk_cmds:7:1: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
#    5|   DIR=/usr/share/ss
#    6|   AWK=gawk
#    7|-> SED=sed
#    8|   
#    9|   for as_var in \

Error: SHELLCHECK_WARNING (CWE-398): [#def13]
/usr/bin/mk_cmds:14:49: warning[SC2163]: This does not export 'as_var'. Remove $/${} for that, or use ${var?} to quiet.
#   12|     LC_TELEPHONE LC_TIME
#   13|   do
#   14|->   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
#   15|       eval $as_var=C; export $as_var
#   16|     else

Error: SHELLCHECK_WARNING (CWE-398): [#def14]
/usr/bin/mk_cmds:15:28: warning[SC2163]: This does not export 'as_var'. Remove $/${} for that, or use ${var?} to quiet.
#   13|   do
#   14|     if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
#   15|->     eval $as_var=C; export $as_var
#   16|     else
#   17|       $as_unset $as_var

Error: SHELLCHECK_WARNING (CWE-457): [#def15]
/usr/bin/mk_cmds:17:5: warning[SC2154]: as_unset is referenced but not assigned.
#   15|       eval $as_var=C; export $as_var
#   16|     else
#   17|->     $as_unset $as_var
#   18|     fi
#   19|   done

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
e2fsprogs-1.47.3/debugfs/debugfs.c:116:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/debugfs/debugfs.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:103:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:105:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:107:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:111:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:114:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:116:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:116:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  114|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
#  115|   		retval = errno;
#  116|-> 		com_err("debugfs", retval,
#  117|   			"while trying to delete %s", tdb_file);
#  118|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
e2fsprogs-1.47.3/debugfs/debugfs.c:121:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/debugfs/debugfs.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:103:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:105:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:107:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:111:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:121:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:121:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  119|   	}
#  120|   
#  121|-> 	retval = set_undo_io_backing_manager(*io_ptr);
#  122|   	if (retval)
#  123|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
e2fsprogs-1.47.3/debugfs/debugfs.c:125:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/debugfs/debugfs.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:103:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:105:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:107:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:111:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:124:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:125:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:125:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  123|   		goto errout;
#  124|   	*io_ptr = undo_io_manager;
#  125|-> 	retval = set_undo_io_backup_file(tdb_file);
#  126|   	if (retval)
#  127|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
e2fsprogs-1.47.3/debugfs/debugfs.c:800:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/debugfs.c:785:13: enter_function: entry to ‘dump_inline_symlink’
e2fsprogs-1.47.3/debugfs/debugfs.c:793:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:796:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:796:18: call_function: calling ‘ext2fs_get_memzero’ from ‘dump_inline_symlink’
e2fsprogs-1.47.3/debugfs/debugfs.c:796:18: return_function: returning to ‘dump_inline_symlink’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/debugfs.c:797:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:800:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:800:18: throw: if ‘ext2fs_inline_data_get’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:800:18: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  798|   		goto out;
#  799|   
#  800|-> 	retval = ext2fs_inline_data_get(current_fs, inode_num,
#  801|   					inode, buf, &size);
#  802|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:13: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_buf’
e2fsprogs-1.47.3/debugfs/debugfs.c:993:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:997:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:997:25: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:998:12: branch_false: following ‘false’ branch (when ‘inode_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:13: throw: if ‘common_inode_args_process’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:13: danger: ‘inode_buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1001|   	}
# 1002|   
# 1003|-> 	if (common_inode_args_process(argc, argv, &inode, 0)) {
# 1004|   		free(inode_buf);
# 1005|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
e2fsprogs-1.47.3/debugfs/debugfs.c:1008:13: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_buf’
e2fsprogs-1.47.3/debugfs/debugfs.c:993:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:997:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:997:25: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:998:12: branch_false: following ‘false’ branch (when ‘inode_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:1003:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:1009:33: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:1008:13: throw: if ‘debugfs_read_inode2’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:1008:13: danger: ‘inode_buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1006|   	}
# 1007|   
# 1008|-> 	if (debugfs_read_inode2(inode, inode_buf, argv[0],
# 1009|   				EXT2_INODE_SIZE(current_fs->super), 0)) {
# 1010|   		free(inode_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
e2fsprogs-1.47.3/debugfs/debugfs.c:2196:15: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)isize)’
e2fsprogs-1.47.3/debugfs/debugfs.c:2160:6: enter_function: entry to ‘do_idump’
e2fsprogs-1.47.3/debugfs/debugfs.c:2179:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2182:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2182:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2185:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2186:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2189:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2190:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_idump’
e2fsprogs-1.47.3/debugfs/debugfs.c:2196:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2196:15: throw: if ‘ext2fs_read_inode_full’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2196:15: danger: ‘malloc((long unsigned int)isize)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 2194|   	}
# 2195|   
# 2196|-> 	err = ext2fs_read_inode_full(current_fs, ino,
# 2197|   				     (struct ext2_inode *)buf, isize);
# 2198|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2502|   		}
# 2503|   	}
# 2504|-> 	fflush(stdout);
# 2505|   	fflush(stderr);
# 2506|   	setbuf(stdout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2502|   		}
# 2503|   	}
# 2504|-> 	fflush(stdout);
# 2505|   	fflush(stderr);
# 2506|   	setbuf(stdout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 2503|   	}
# 2504|   	fflush(stdout);
# 2505|-> 	fflush(stderr);
# 2506|   	setbuf(stdout, NULL);
# 2507|   	setbuf(stderr, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2505:9: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 2503|   	}
# 2504|   	fflush(stdout);
# 2505|-> 	fflush(stderr);
# 2506|   	setbuf(stdout, NULL);
# 2507|   	setbuf(stderr, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2508:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2511:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2516:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2518:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2519:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2521:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: throw: if ‘ss_execute_line’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 2520|   			*cp = 0;
# 2521|   		printf("debugfs: %s\n", buf);
# 2522|-> 		retval = ss_execute_line(ss_idx, buf);
# 2523|   		if (retval) {
# 2524|   			ss_perror(ss_idx, retval, buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2508:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2511:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2516:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2518:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2519:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2521:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: throw: if ‘ss_execute_line’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2522:26: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 2520|   			*cp = 0;
# 2521|   		printf("debugfs: %s\n", buf);
# 2522|-> 		retval = ss_execute_line(ss_idx, buf);
# 2523|   		if (retval) {
# 2524|   			ss_perror(ss_idx, retval, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2508:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2511:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2516:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2518:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2519:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2521:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2523:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 2522|   		retval = ss_execute_line(ss_idx, buf);
# 2523|   		if (retval) {
# 2524|-> 			ss_perror(ss_idx, retval, buf);
# 2525|   			exit_status++;
# 2526|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2508:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2509:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2511:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2516:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2518:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2519:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2521:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2523:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/debugfs/debugfs.c:2524:25: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 2522|   		retval = ss_execute_line(ss_idx, buf);
# 2523|   		if (retval) {
# 2524|-> 			ss_perror(ss_idx, retval, buf);
# 2525|   			exit_status++;
# 2526|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2528:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 2528|   	if (f != stdin)
# 2529|   		fclose(f);
# 2530|-> 	return exit_status;
# 2531|   }
# 2532|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/debugfs/debugfs.c:2495:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2498:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/debugfs.c:2499:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2504:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2528:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/debugfs.c:2530:16: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 2528|   	if (f != stdin)
# 2529|   		fclose(f);
# 2530|-> 	return exit_status;
# 2531|   }
# 2532|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
e2fsprogs-1.47.3/debugfs/do_orphan.c:108:18: warning[-Wanalyzer-malloc-leak]: leak of ‘orphan_buf’
e2fsprogs-1.47.3/debugfs/do_orphan.c:83:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/do_orphan.c:85:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/do_orphan.c:85:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
e2fsprogs-1.47.3/debugfs/do_orphan.c:89:25: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/do_orphan.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/do_orphan.c:99:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/do_orphan.c:101:22: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/do_orphan.c:102:12: branch_false: following ‘false’ branch (when ‘orphan_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/do_orphan.c:106:31: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/do_orphan.c:108:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/do_orphan.c:108:18: danger: ‘orphan_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  106|   	pd.buf = orphan_buf + 3 * current_fs->blocksize;
#  107|   	pd.progname = argv[0];
#  108|-> 	retval = ext2fs_block_iterate3(current_fs,
#  109|   				       current_fs->super->s_orphan_file_inum,
#  110|   				       BLOCK_FLAG_DATA_ONLY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
e2fsprogs-1.47.3/debugfs/dump.c:110:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  108|   	unsigned int	got, blocksize = current_fs->blocksize;
#  109|   
#  110|-> 	if (debugfs_read_inode(ino, &inode, cmdname))
#  111|   		return;
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
e2fsprogs-1.47.3/debugfs/dump.c:113:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  111|   		return;
#  112|   
#  113|-> 	retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  114|   	if (retval) {
#  115|   		com_err(cmdname, retval, "while opening ext2 file");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
e2fsprogs-1.47.3/debugfs/dump.c:115:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  113|   	retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  114|   	if (retval) {
#  115|-> 		com_err(cmdname, retval, "while opening ext2 file");
#  116|   		return;
#  117|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
e2fsprogs-1.47.3/debugfs/dump.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  118|   	retval = ext2fs_get_mem(blocksize, &buf);
#  119|   	if (retval) {
#  120|-> 		com_err(cmdname, retval, "while allocating memory");
#  121|   		return;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
e2fsprogs-1.47.3/debugfs/dump.c:124:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  122|   	}
#  123|   	while (1) {
#  124|-> 		retval = ext2fs_file_read(e2_file, buf, blocksize, &got);
#  125|   		if (retval) {
#  126|   			com_err(cmdname, retval, "while reading ext2 file");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
e2fsprogs-1.47.3/debugfs/dump.c:124:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)blocksize)’
e2fsprogs-1.47.3/debugfs/dump.c:373:6: enter_function: entry to ‘do_cat’
e2fsprogs-1.47.3/debugfs/dump.c:378:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:381:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:383:9: call_function: calling ‘dump_file’ from ‘do_cat’
#  122|   	}
#  123|   	while (1) {
#  124|-> 		retval = ext2fs_file_read(e2_file, buf, blocksize, &got);
#  125|   		if (retval) {
#  126|   			com_err(cmdname, retval, "while reading ext2 file");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
e2fsprogs-1.47.3/debugfs/dump.c:131:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  129|   		if (got == 0)
#  130|   			break;
#  131|-> 		nbytes = write(fd, buf, got);
#  132|   		if ((unsigned) nbytes != got)
#  133|   			com_err(cmdname, errno, "while writing file");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
e2fsprogs-1.47.3/debugfs/dump.c:133:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:276:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:276:17: call_function: calling ‘dump_file’ from ‘rdump_inode’
#  131|   		nbytes = write(fd, buf, got);
#  132|   		if ((unsigned) nbytes != got)
#  133|-> 			com_err(cmdname, errno, "while writing file");
#  134|   	}
#  135|   	if (buf)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
e2fsprogs-1.47.3/debugfs/dump.c:210:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  208|   	buf = malloc(inode->i_size + 1);
#  209|   	if (!buf) {
#  210|-> 		com_err("rdump", errno, "while allocating for symlink");
#  211|   		goto errout;
#  212|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
e2fsprogs-1.47.3/debugfs/dump.c:214:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/dump.c:208:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:209:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:214:13: throw: if ‘ext2fs_is_fast_symlink’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:214:13: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  212|   	}
#  213|   
#  214|-> 	if (ext2fs_is_fast_symlink(inode))
#  215|   		strcpy(buf, (char *) inode->i_block);
#  216|   	else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
e2fsprogs-1.47.3/debugfs/dump.c:214:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  212|   	}
#  213|   
#  214|-> 	if (ext2fs_is_fast_symlink(inode))
#  215|   		strcpy(buf, (char *) inode->i_block);
#  216|   	else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
e2fsprogs-1.47.3/debugfs/dump.c:219:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/dump.c:208:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:209:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:214:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:217:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:219:26: throw: if ‘ext2fs_file_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:219:26: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  217|   		unsigned bytes = inode->i_size;
#  218|   		char *p = buf;
#  219|-> 		retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  220|   		if (retval) {
#  221|   			com_err("rdump", retval, "while opening symlink");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
e2fsprogs-1.47.3/debugfs/dump.c:219:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  217|   		unsigned bytes = inode->i_size;
#  218|   		char *p = buf;
#  219|-> 		retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  220|   		if (retval) {
#  221|   			com_err("rdump", retval, "while opening symlink");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
e2fsprogs-1.47.3/debugfs/dump.c:221:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/dump.c:208:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:209:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:214:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:217:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:220:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:221:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:221:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:221:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  219|   		retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  220|   		if (retval) {
#  221|-> 			com_err("rdump", retval, "while opening symlink");
#  222|   			goto errout;
#  223|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
e2fsprogs-1.47.3/debugfs/dump.c:221:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  219|   		retval = ext2fs_file_open(current_fs, ino, 0, &e2_file);
#  220|   		if (retval) {
#  221|-> 			com_err("rdump", retval, "while opening symlink");
#  222|   			goto errout;
#  223|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
e2fsprogs-1.47.3/debugfs/dump.c:226:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  224|   		for (;;) {
#  225|   			unsigned int got;
#  226|-> 			retval = ext2fs_file_read(e2_file, p, bytes, &got);
#  227|   			if (retval) {
#  228|   				com_err("rdump", retval, "while reading symlink");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
e2fsprogs-1.47.3/debugfs/dump.c:226:34: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
e2fsprogs-1.47.3/debugfs/dump.c:208:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:209:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:214:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:217:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:220:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:220:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:226:34: throw: if ‘ext2fs_file_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:226:34: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  224|   		for (;;) {
#  225|   			unsigned int got;
#  226|-> 			retval = ext2fs_file_read(e2_file, p, bytes, &got);
#  227|   			if (retval) {
#  228|   				com_err("rdump", retval, "while reading symlink");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
e2fsprogs-1.47.3/debugfs/dump.c:228:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  226|   			retval = ext2fs_file_read(e2_file, p, bytes, &got);
#  227|   			if (retval) {
#  228|-> 				com_err("rdump", retval, "while reading symlink");
#  229|   				goto errout;
#  230|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
e2fsprogs-1.47.3/debugfs/dump.c:237:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  235|   		}
#  236|   		buf[inode->i_size] = 0;
#  237|-> 		retval = ext2fs_file_close(e2_file);
#  238|   		if (retval)
#  239|   			com_err("rdump", retval, "while closing symlink");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
e2fsprogs-1.47.3/debugfs/dump.c:243:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/dump.c:253:13: enter_function: entry to ‘rdump_inode’
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:268:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:268:17: call_function: calling ‘rdump_symlink’ from ‘rdump_inode’
#  241|   
#  242|   	if (symlink(buf, fullname) == -1) {
#  243|-> 		com_err("rdump", errno, "while creating symlink %s -> %s", buf, fullname);
#  244|   		goto errout;
#  245|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
e2fsprogs-1.47.3/debugfs/dump.c:271:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:271:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: danger: ‘fullname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  269|   	else if (LINUX_S_ISREG(inode->i_mode)) {
#  270|   		int fd;
#  271|-> 		fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, S_IRWXU);
#  272|   		if (fd == -1) {
#  273|   			com_err("rdump", errno, "while opening %s", fullname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
e2fsprogs-1.47.3/debugfs/dump.c:273:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:271:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:272:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:273:42: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:273:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:273:25: danger: ‘fullname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  271|   		fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, S_IRWXU);
#  272|   		if (fd == -1) {
#  273|-> 			com_err("rdump", errno, "while opening %s", fullname);
#  274|   			goto errout;
#  275|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
e2fsprogs-1.47.3/debugfs/dump.c:289:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:282:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:282:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:288:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:289:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:289:25: danger: ‘fullname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  287|   		 * once we've done the traversal. */
#  288|   		if (name[0] && mkdir(fullname, S_IRWXU) == -1) {
#  289|-> 			com_err("rdump", errno, "while making directory %s", fullname);
#  290|   			goto errout;
#  291|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
e2fsprogs-1.47.3/debugfs/dump.c:293:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fullname’
e2fsprogs-1.47.3/debugfs/dump.c:260:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/dump.c:261:12: branch_false: following ‘false’ branch (when ‘fullname’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/dump.c:265:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:267:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:269:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:282:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/dump.c:282:17: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/dump.c:293:26: throw: if ‘ext2fs_dir_iterate’ throws an exception...
e2fsprogs-1.47.3/debugfs/dump.c:293:26: danger: ‘fullname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  291|   		}
#  292|   
#  293|-> 		retval = ext2fs_dir_iterate(current_fs, ino, 0, 0,
#  294|   					    rdump_dirent, (void *) fullname);
#  295|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
e2fsprogs-1.47.3/debugfs/htree.c:215:19: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  213|   	}
#  214|   
#  215|-> 	errcode = ext2fs_bmap2(fs, ino, inode, buf, 0, blk, 0, &pblk);
#  216|   	if (errcode) {
#  217|   		com_err("htree_dump_int_block", errcode,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
e2fsprogs-1.47.3/debugfs/htree.c:217:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  215|   	errcode = ext2fs_bmap2(fs, ino, inode, buf, 0, blk, 0, &pblk);
#  216|   	if (errcode) {
#  217|-> 		com_err("htree_dump_int_block", errcode,
#  218|   			"while mapping logical block %llu\n",
#  219|   			(unsigned long long) blk);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
e2fsprogs-1.47.3/debugfs/htree.c:223:19: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  221|   	}
#  222|   
#  223|-> 	errcode = io_channel_read_blk64(current_fs->io, pblk, 1, buf);
#  224|   	if (errcode) {
#  225|   		com_err("htree_dump_int_block", errcode,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
e2fsprogs-1.47.3/debugfs/htree.c:225:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  223|   	errcode = io_channel_read_blk64(current_fs->io, pblk, 1, buf);
#  224|   	if (errcode) {
#  225|-> 		com_err("htree_dump_int_block", errcode,
#  226|   			"while reading block %llu\n",
#  227|   			(unsigned long long) blk);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
e2fsprogs-1.47.3/debugfs/htree.c:231:19: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  229|   	}
#  230|   
#  231|-> 	errcode = ext2fs_dx_csum(current_fs, ino,
#  232|   				 (struct ext2_dir_entry *) buf, &crc, NULL);
#  233|   	if (errcode) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
e2fsprogs-1.47.3/debugfs/htree.c:234:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cbuf’
e2fsprogs-1.47.3/debugfs/htree.c:248:6: enter_function: entry to ‘do_htree_dump’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:288:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:294:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:301:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:315:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:322:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:320:9: call_function: calling ‘htree_dump_int_node’ from ‘do_htree_dump’
#  232|   				 (struct ext2_dir_entry *) buf, &crc, NULL);
#  233|   	if (errcode) {
#  234|-> 		com_err("htree_dump_int_block", errcode,
#  235|   			"while calculating checksum for logical block %llu\n",
#  236|   			(unsigned long long) blk);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
e2fsprogs-1.47.3/debugfs/htree.c:287:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/htree.c:260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:263:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:265:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:268:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:268:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:271:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:276:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:276:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:281:34: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:281:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/htree.c:282:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:287:19: throw: if ‘ext2fs_bmap2’ throws an exception...
e2fsprogs-1.47.3/debugfs/htree.c:287:19: danger: ‘buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  285|   	}
#  286|   
#  287|-> 	errcode = ext2fs_bmap2(current_fs, ino, &inode, buf, 0, 0, 0, &blk);
#  288|   	if (errcode) {
#  289|   		com_err("do_htree_block", errcode,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
e2fsprogs-1.47.3/debugfs/htree.c:454:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pb.buf’
e2fsprogs-1.47.3/debugfs/htree.c:434:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:437:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:437:12: branch_false: following ‘false’ branch (when ‘argc == 3’)...
e2fsprogs-1.47.3/debugfs/htree.c:442:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:443:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:446:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:446:18: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/htree.c:447:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/htree.c:451:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/htree.c:454:9: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/htree.c:454:9: danger: ‘pb.buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  452|   	pb.len = strlen(pb.search_name);
#  453|   
#  454|-> 	ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, 0,
#  455|   			      search_dir_block, &pb);
#  456|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
e2fsprogs-1.47.3/debugfs/icheck.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bw.barray’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_true: following ‘true’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:85:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:85:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:85:17: danger: ‘bw.barray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   83|   	block_buf = malloc(current_fs->blocksize * 3);
#   84|   	if (!block_buf) {
#   85|-> 		com_err("icheck", ENOMEM, "while allocating block buffer");
#   86|   		goto error_out;
#   87|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: throw: if ‘strtoblk’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#   88|   
#   89|   	for (i=1; i < argc; i++) {
#   90|-> 		if (strtoblk(argv[0], argv[i], NULL, &bw.barray[i-1].blk))
#   91|   			goto error_out;
#   92|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: warning[-Wanalyzer-malloc-leak]: leak of ‘bw.barray’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: throw: if ‘strtoblk’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:90:21: danger: ‘bw.barray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   88|   
#   89|   	for (i=1; i < argc; i++) {
#   90|-> 		if (strtoblk(argv[0], argv[i], NULL, &bw.barray[i-1].blk))
#   91|   			goto error_out;
#   92|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
e2fsprogs-1.47.3/debugfs/icheck.c:96:18: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:96:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:96:18: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#   94|   	bw.num_blocks = bw.blocks_left = argc-1;
#   95|   
#   96|-> 	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#   97|   	if (retval) {
#   98|   		com_err("icheck", retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
e2fsprogs-1.47.3/debugfs/icheck.c:98:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:98:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:98:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:98:17: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#   96|   	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#   97|   	if (retval) {
#   98|-> 		com_err("icheck", retval, "while opening inode scan");
#   99|   		goto error_out;
#  100|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
e2fsprogs-1.47.3/debugfs/icheck.c:103:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:103:26: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:103:26: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  101|   
#  102|   	do {
#  103|-> 		retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  104|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  105|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
e2fsprogs-1.47.3/debugfs/icheck.c:106:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:106:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:106:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:106:17: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  104|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  105|   	if (retval) {
#  106|-> 		com_err("icheck", retval, "while starting inode scan");
#  107|   		goto error_out;
#  108|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
e2fsprogs-1.47.3/debugfs/icheck.c:118:23: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:113:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:116:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:118:23: throw: if ‘ext2fs_file_acl_block’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:118:23: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  116|   		bw.inode = ino;
#  117|   
#  118|-> 		blk = ext2fs_file_acl_block(current_fs, &inode);
#  119|   		if (blk) {
#  120|   			icheck_proc(current_fs, &blk, 0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
e2fsprogs-1.47.3/debugfs/icheck.c:124:25: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:119:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:120:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:122:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:124:25: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:124:25: throw: if ‘ext2fs_file_acl_block_set’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:124:25: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  122|   			if (bw.blocks_left == 0)
#  123|   				break;
#  124|-> 			ext2fs_file_acl_block_set(current_fs, &inode, blk);
#  125|   		}
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
e2fsprogs-1.47.3/debugfs/icheck.c:127:22: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:119:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:127:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:127:22: throw: if ‘ext2fs_inode_has_valid_blocks2’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:127:22: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  125|   		}
#  126|   
#  127|-> 		if (!ext2fs_inode_has_valid_blocks2(current_fs, &inode))
#  128|   			goto next;
#  129|   		/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
e2fsprogs-1.47.3/debugfs/icheck.c:136:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:56:6: enter_function: entry to ‘do_icheck’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:119:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:120:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:120:25: call_function: calling ‘icheck_proc’ from ‘do_icheck’
e2fsprogs-1.47.3/debugfs/icheck.c:120:25: return_function: returning to ‘do_icheck’ from ‘icheck_proc’
e2fsprogs-1.47.3/debugfs/icheck.c:122:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:124:25: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:127:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:133:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:133:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:136:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:136:26: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:136:26: danger: ‘block_buf’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
#  134|   			goto next;
#  135|   
#  136|-> 		retval = ext2fs_block_iterate3(current_fs, ino,
#  137|   					       BLOCK_FLAG_READ_ONLY, block_buf,
#  138|   					       icheck_proc, &bw);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
e2fsprogs-1.47.3/debugfs/icheck.c:150:34: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:113:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:114:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:150:34: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:150:34: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  148|   	next:
#  149|   		do {
#  150|-> 			retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  151|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  152|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
e2fsprogs-1.47.3/debugfs/icheck.c:153:25: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/icheck.c:68:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/icheck.c:72:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:72:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:75:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:76:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:81:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:83:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/icheck.c:84:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:89:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/icheck.c:90:55: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:90:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:89:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:97:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:105:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:110:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:113:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:113:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:114:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:151:26: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/icheck.c:152:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/icheck.c:153:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/icheck.c:153:25: danger: ‘block_buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  151|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  152|   		if (retval) {
#  153|-> 			com_err("icheck", retval,
#  154|   				"while doing inode scan");
#  155|   			goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
e2fsprogs-1.47.3/debugfs/journal.c:116:18: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:395:38: call_function: calling ‘jbd2_journal_bmap’ from ‘ext2fs_get_journal’
#  114|   	}
#  115|   
#  116|-> 	retval = ext2fs_bmap2(inode->i_fs, inode->i_ino,
#  117|   			      &inode->i_ext2, NULL, 0, (blk64_t) block,
#  118|   			      0, &pblk);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
e2fsprogs-1.47.3/debugfs/journal.c:116:18: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:395:38: call_function: calling ‘jbd2_journal_bmap’ from ‘ext2fs_get_journal’
#  114|   	}
#  115|   
#  116|-> 	retval = ext2fs_bmap2(inode->i_fs, inode->i_ino,
#  117|   			      &inode->i_ext2, NULL, 0, (blk64_t) block,
#  118|   			      0, &pblk);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
e2fsprogs-1.47.3/debugfs/journal.c:175:34: warning[-Wanalyzer-malloc-leak]: leak of ‘bh’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:444:22: call_function: calling ‘getblk’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:444:22: return_function: returning to ‘ext2fs_get_journal’ from ‘getblk’
e2fsprogs-1.47.3/debugfs/journal.c:445:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:449:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:449:17: call_function: calling ‘ll_rw_block’ from ‘ext2fs_get_journal’
#  173|   			jfs_debug(3, "reading block %llu/%p\n",
#  174|   				  bh->b_blocknr, (void *) bh);
#  175|-> 			retval = io_channel_read_blk64(bh->b_io,
#  176|   						     bh->b_blocknr,
#  177|   						     1, bh->b_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
e2fsprogs-1.47.3/debugfs/journal.c:175:34: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:444:22: call_function: calling ‘getblk’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:444:22: return_function: returning to ‘ext2fs_get_journal’ from ‘getblk’
e2fsprogs-1.47.3/debugfs/journal.c:445:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:449:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:449:17: call_function: calling ‘ll_rw_block’ from ‘ext2fs_get_journal’
#  173|   			jfs_debug(3, "reading block %llu/%p\n",
#  174|   				  bh->b_blocknr, (void *) bh);
#  175|-> 			retval = io_channel_read_blk64(bh->b_io,
#  176|   						     bh->b_blocknr,
#  177|   						     1, bh->b_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
e2fsprogs-1.47.3/debugfs/journal.c:175:34: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:444:22: call_function: calling ‘getblk’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:444:22: return_function: returning to ‘ext2fs_get_journal’ from ‘getblk’
e2fsprogs-1.47.3/debugfs/journal.c:445:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:449:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:449:17: call_function: calling ‘ll_rw_block’ from ‘ext2fs_get_journal’
#  173|   			jfs_debug(3, "reading block %llu/%p\n",
#  174|   				  bh->b_blocknr, (void *) bh);
#  175|-> 			retval = io_channel_read_blk64(bh->b_io,
#  176|   						     bh->b_blocknr,
#  177|   						     1, bh->b_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
e2fsprogs-1.47.3/debugfs/journal.c:179:33: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:444:22: call_function: calling ‘getblk’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:444:22: return_function: returning to ‘ext2fs_get_journal’ from ‘getblk’
e2fsprogs-1.47.3/debugfs/journal.c:445:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:449:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:449:17: call_function: calling ‘ll_rw_block’ from ‘ext2fs_get_journal’
#  177|   						     1, bh->b_data);
#  178|   			if (retval) {
#  179|-> 				com_err(bh->b_fs->device_name, retval,
#  180|   					"while reading block %llu\n",
#  181|   					bh->b_blocknr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
e2fsprogs-1.47.3/debugfs/journal.c:179:33: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:444:22: call_function: calling ‘getblk’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:444:22: return_function: returning to ‘ext2fs_get_journal’ from ‘getblk’
e2fsprogs-1.47.3/debugfs/journal.c:445:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:449:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:449:17: call_function: calling ‘ll_rw_block’ from ‘ext2fs_get_journal’
#  177|   						     1, bh->b_data);
#  178|   			if (retval) {
#  179|-> 				com_err(bh->b_fs->device_name, retval,
#  180|   					"while reading block %llu\n",
#  181|   					bh->b_blocknr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
e2fsprogs-1.47.3/debugfs/journal.c:327:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:13: throw: if ‘uuid_is_null’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:327:13: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/10)
#  325|   	journal->j_blocksize = fs->blocksize;
#  326|   
#  327|-> 	if (uuid_is_null(sb->s_journal_uuid)) {
#  328|   		if (!sb->s_journal_inum) {
#  329|   			retval = EXT2_ET_BAD_INODE_NUM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
e2fsprogs-1.47.3/debugfs/journal.c:327:13: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:13: throw: if ‘uuid_is_null’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:327:13: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  325|   	journal->j_blocksize = fs->blocksize;
#  326|   
#  327|-> 	if (uuid_is_null(sb->s_journal_uuid)) {
#  328|   		if (!sb->s_journal_inum) {
#  329|   			retval = EXT2_ET_BAD_INODE_NUM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
e2fsprogs-1.47.3/debugfs/journal.c:339:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:339:26: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:339:26: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/10)
#  337|   		j_inode->i_ino = sb->s_journal_inum;
#  338|   
#  339|-> 		retval = ext2fs_read_inode(fs, sb->s_journal_inum,
#  340|   					   &j_inode->i_ext2);
#  341|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
e2fsprogs-1.47.3/debugfs/journal.c:339:26: warning[-Wanalyzer-malloc-leak]: leak of ‘j_inode’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:339:26: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:339:26: danger: ‘j_inode’ leaks here; was allocated at [(22)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/21)
#  337|   		j_inode->i_ino = sb->s_journal_inum;
#  338|   
#  339|-> 		retval = ext2fs_read_inode(fs, sb->s_journal_inum,
#  340|   					   &j_inode->i_ext2);
#  341|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
e2fsprogs-1.47.3/debugfs/journal.c:339:26: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:339:26: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:339:26: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/3)
#  337|   		j_inode->i_ino = sb->s_journal_inum;
#  338|   
#  339|-> 		retval = ext2fs_read_inode(fs, sb->s_journal_inum,
#  340|   					   &j_inode->i_ext2);
#  341|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
e2fsprogs-1.47.3/debugfs/journal.c:366:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:341:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:355:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:356:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:360:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:360:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:366:26: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:366:26: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
#  364|   		}
#  365|   		pb.last_block = -1;
#  366|-> 		retval = ext2fs_block_iterate3(fs, j_inode->i_ino,
#  367|   					       BLOCK_FLAG_HOLE, 0,
#  368|   					       process_journal_block, &pb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
e2fsprogs-1.47.3/debugfs/journal.c:366:26: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:341:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:355:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:356:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:360:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:360:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:366:26: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:366:26: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/3)
#  364|   		}
#  365|   		pb.last_block = -1;
#  366|-> 		retval = ext2fs_block_iterate3(fs, j_inode->i_ino,
#  367|   					       BLOCK_FLAG_HOLE, 0,
#  368|   					       process_journal_block, &pb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
e2fsprogs-1.47.3/debugfs/journal.c:375:34: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:343:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:355:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:356:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:360:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:360:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:374:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:375:34: throw: if ‘ext2fs_write_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:375:34: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/10)
#  373|   		}
#  374|   		if (tried_backup_jnl && (fs->flags & EXT2_FLAG_RW)) {
#  375|-> 			retval = ext2fs_write_inode(fs, sb->s_journal_inum,
#  376|   						    &j_inode->i_ext2);
#  377|   			if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
e2fsprogs-1.47.3/debugfs/journal.c:375:34: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:328:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:328:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:332:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:332:26: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:332:26: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:333:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:336:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:343:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:355:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:356:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:355:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:360:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:360:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:374:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:375:34: throw: if ‘ext2fs_write_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:375:34: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/3)
#  373|   		}
#  374|   		if (tried_backup_jnl && (fs->flags & EXT2_FLAG_RW)) {
#  375|-> 			retval = ext2fs_write_inode(fs, sb->s_journal_inum,
#  376|   						    &j_inode->i_ext2);
#  377|   			if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
e2fsprogs-1.47.3/debugfs/journal.c:405:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:405:25: throw: if ‘blkid_get_cache’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/10)
#  403|   			blkid_cache blkid;
#  404|   
#  405|-> 			blkid_get_cache(&blkid, NULL);
#  406|   			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|   			fs->journal_name = blkid_get_devname(blkid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
e2fsprogs-1.47.3/debugfs/journal.c:405:25: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:405:25: throw: if ‘blkid_get_cache’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/3)
#  403|   			blkid_cache blkid;
#  404|   
#  405|-> 			blkid_get_cache(&blkid, NULL);
#  406|   			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|   			fs->journal_name = blkid_get_devname(blkid,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
e2fsprogs-1.47.3/debugfs/journal.c:406:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:406:25: throw: if ‘uuid_unparse’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:406:25: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/10)
#  404|   
#  405|   			blkid_get_cache(&blkid, NULL);
#  406|-> 			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|   			fs->journal_name = blkid_get_devname(blkid,
#  408|   							      "UUID", uuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
e2fsprogs-1.47.3/debugfs/journal.c:406:25: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:406:25: throw: if ‘uuid_unparse’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:406:25: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/3)
#  404|   
#  405|   			blkid_get_cache(&blkid, NULL);
#  406|-> 			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|   			fs->journal_name = blkid_get_devname(blkid,
#  408|   							      "UUID", uuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
e2fsprogs-1.47.3/debugfs/journal.c:407:44: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:407:44: throw: if ‘blkid_get_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:407:44: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/10)
#  405|   			blkid_get_cache(&blkid, NULL);
#  406|   			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|-> 			fs->journal_name = blkid_get_devname(blkid,
#  408|   							      "UUID", uuid);
#  409|   			if (!fs->journal_name)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
e2fsprogs-1.47.3/debugfs/journal.c:407:44: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:407:44: throw: if ‘blkid_get_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:407:44: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/3)
#  405|   			blkid_get_cache(&blkid, NULL);
#  406|   			uuid_unparse(sb->s_journal_uuid, uuid);
#  407|-> 			fs->journal_name = blkid_get_devname(blkid,
#  408|   							      "UUID", uuid);
#  409|   			if (!fs->journal_name)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
e2fsprogs-1.47.3/debugfs/journal.c:410:52: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:409:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:410:75: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:410:52: throw: if ‘blkid_devno_to_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:410:52: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/10)
#  408|   							      "UUID", uuid);
#  409|   			if (!fs->journal_name)
#  410|-> 				fs->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
#  411|   			blkid_put_cache(blkid);
#  412|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
e2fsprogs-1.47.3/debugfs/journal.c:410:52: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:409:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:410:75: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:410:52: throw: if ‘blkid_devno_to_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:410:52: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/3)
#  408|   							      "UUID", uuid);
#  409|   			if (!fs->journal_name)
#  410|-> 				fs->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
#  411|   			blkid_put_cache(blkid);
#  412|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
e2fsprogs-1.47.3/debugfs/journal.c:411:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:409:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:411:25: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:411:25: throw: if ‘blkid_put_cache’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:411:25: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/10)
#  409|   			if (!fs->journal_name)
#  410|   				fs->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
#  411|-> 			blkid_put_cache(blkid);
#  412|   		}
#  413|   		journal_name = fs->journal_name;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
e2fsprogs-1.47.3/debugfs/journal.c:411:25: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:401:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:405:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:409:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:411:25: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:411:25: throw: if ‘blkid_put_cache’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:411:25: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/3)
#  409|   			if (!fs->journal_name)
#  410|   				fs->journal_name = blkid_devno_to_devname(sb->s_journal_dev);
#  411|-> 			blkid_put_cache(blkid);
#  412|   		}
#  413|   		journal_name = fs->journal_name;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
e2fsprogs-1.47.3/debugfs/journal.c:432:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:432:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:432:26: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/10)
#  430|   #endif
#  431|   	{
#  432|-> 		retval = io_ptr->open(journal_name, fs->flags & EXT2_FLAG_RW,
#  433|   				      &fs->journal_io);
#  434|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
e2fsprogs-1.47.3/debugfs/journal.c:432:26: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:432:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:432:26: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3)
#  430|   #endif
#  431|   	{
#  432|-> 		retval = io_ptr->open(journal_name, fs->flags & EXT2_FLAG_RW,
#  433|   				      &fs->journal_io);
#  434|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
e2fsprogs-1.47.3/debugfs/journal.c:438:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:438:9: throw: if the called function throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/10)
#  436|   		goto errout;
#  437|   
#  438|-> 	io_channel_set_blksize(fs->journal_io, fs->blocksize);
#  439|   
#  440|   	if (ext_journal) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
e2fsprogs-1.47.3/debugfs/journal.c:438:9: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:438:9: throw: if the called function throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
#  436|   		goto errout;
#  437|   
#  438|-> 	io_channel_set_blksize(fs->journal_io, fs->blocksize);
#  439|   
#  440|   	if (ext_journal) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
e2fsprogs-1.47.3/debugfs/journal.c:443:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_fs’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:443:25: throw: if ‘ext2fs_journal_sb_start’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:443:25: danger: ‘dev_fs’ leaks here; was allocated at [(11)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/10)
#  441|   		blk64_t maxlen;
#  442|   
#  443|-> 		start = ext2fs_journal_sb_start(fs->blocksize) - 1;
#  444|   		bh = getblk(dev_journal, start, fs->blocksize);
#  445|   		if (!bh) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
e2fsprogs-1.47.3/debugfs/journal.c:443:25: warning[-Wanalyzer-malloc-leak]: leak of ‘journal’
e2fsprogs-1.47.3/debugfs/journal.c:293:18: enter_function: entry to ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:309:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:310:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:313:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:313:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_get_journal’
e2fsprogs-1.47.3/debugfs/journal.c:313:18: return_function: returning to ‘ext2fs_get_journal’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/debugfs/journal.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:316:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/journal.c:401:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:415:20: branch_false: following ‘false’ branch (when ‘journal_name’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/journal.c:421:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:435:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:438:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:440:12: branch_true: following ‘true’ branch (when ‘ext_journal != 0’)...
e2fsprogs-1.47.3/debugfs/journal.c:443:49: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/journal.c:443:25: throw: if ‘ext2fs_journal_sb_start’ throws an exception...
e2fsprogs-1.47.3/debugfs/journal.c:443:25: danger: ‘journal’ leaks here; was allocated at [(4)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/3)
#  441|   		blk64_t maxlen;
#  442|   
#  443|-> 		start = ext2fs_journal_sb_start(fs->blocksize) - 1;
#  444|   		bh = getblk(dev_journal, start, fs->blocksize);
#  445|   		if (!bh) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:214:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  213|   
#  214|   	if (block_to_dump != ANY_BLOCK) {
#  215|-> 		if (check_fs_open(argv[0]))
#  216|   			goto cleanup;
#  217|   		es = current_fs->super;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:214:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  213|   
#  214|   	if (block_to_dump != ANY_BLOCK) {
#  215|-> 		if (check_fs_open(argv[0]))
#  216|   			goto cleanup;
#  217|   		es = current_fs->super;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:214:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:215:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:217:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: throw: if ‘ext2fs_block_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  219|   				  es->s_first_data_block)
#  220|   				 / es->s_blocks_per_group);
#  221|-> 		bitmap_to_dump = ext2fs_block_bitmap_loc(current_fs, group_to_dump);
#  222|   	}
#  223|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:214:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:215:21: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:215:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:217:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: throw: if ‘ext2fs_block_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:221:34: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  219|   				  es->s_first_data_block)
#  220|   				 / es->s_blocks_per_group);
#  221|-> 		bitmap_to_dump = ext2fs_block_bitmap_loc(current_fs, group_to_dump);
#  222|   	}
#  223|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:124:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
e2fsprogs-1.47.3/debugfs/logdump.c:125:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_true: following ‘true’ branch (when ‘journal_fn’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: danger: ‘out_file’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  224|   	if (journal_fn) {
#  225|   		/* Set up to read journal from a regular file somewhere */
#  226|-> 		journal_fd = open(journal_fn, O_RDONLY, 0);
#  227|   		if (journal_fd < 0) {
#  228|   			com_err(argv[0], errno, "while opening %s for logdump",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:124:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
e2fsprogs-1.47.3/debugfs/logdump.c:125:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_true: following ‘true’ branch (when ‘journal_fn’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: danger: ‘out_file’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  224|   	if (journal_fn) {
#  225|   		/* Set up to read journal from a regular file somewhere */
#  226|-> 		journal_fd = open(journal_fn, O_RDONLY, 0);
#  227|   		if (journal_fd < 0) {
#  228|   			com_err(argv[0], errno, "while opening %s for logdump",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:124:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
e2fsprogs-1.47.3/debugfs/logdump.c:125:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_true: following ‘true’ branch (when ‘journal_fn’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:227:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:228:42: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: danger: ‘out_file’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  226|   		journal_fd = open(journal_fn, O_RDONLY, 0);
#  227|   		if (journal_fd < 0) {
#  228|-> 			com_err(argv[0], errno, "while opening %s for logdump",
#  229|   				journal_fn);
#  230|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:124:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
e2fsprogs-1.47.3/debugfs/logdump.c:125:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_true: following ‘true’ branch (when ‘journal_fn’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:226:30: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:227:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:228:42: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:228:25: danger: ‘out_file’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  226|   		journal_fd = open(journal_fn, O_RDONLY, 0);
#  227|   		if (journal_fd < 0) {
#  228|-> 			com_err(argv[0], errno, "while opening %s for logdump",
#  229|   				journal_fn);
#  230|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  236|   
#  237|   	}
#  238|-> 	if (check_fs_open(argv[0]))
#  239|   		goto cleanup;
#  240|   	es = current_fs->super;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  236|   
#  237|   	}
#  238|-> 	if (check_fs_open(argv[0]))
#  239|   		goto cleanup;
#  240|   	es = current_fs->super;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: following ‘true’ branch (when ‘use_sb != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:244:29: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:244:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  243|   		if (use_sb) {
#  244|   			if (es->s_jnl_backup_type != EXT3_JNL_BACKUP_BLOCKS) {
#  245|-> 				com_err(argv[0], 0,
#  246|   					"no journal backup in super block\n");
#  247|   				goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: following ‘true’ branch (when ‘use_sb != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:244:29: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:244:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:245:33: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  243|   		if (use_sb) {
#  244|   			if (es->s_jnl_backup_type != EXT3_JNL_BACKUP_BLOCKS) {
#  245|-> 				com_err(argv[0], 0,
#  246|   					"no journal backup in super block\n");
#  247|   				goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_false: following ‘false’ branch (when ‘use_sb == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: throw: if ‘debugfs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  255|   			journal_inode.i_mode = LINUX_S_IFREG | 0600;
#  256|   		} else {
#  257|-> 			if (debugfs_read_inode(journal_inum, &journal_inode,
#  258|   					       argv[0]))
#  259|   				goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_false: following ‘false’ branch (when ‘use_sb == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: throw: if ‘debugfs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  255|   			journal_inode.i_mode = LINUX_S_IFREG | 0600;
#  256|   		} else {
#  257|-> 			if (debugfs_read_inode(journal_inum, &journal_inode,
#  258|   					       argv[0]))
#  259|   				goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_false: following ‘false’ branch (when ‘use_sb == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: throw: if ‘ext2fs_file_open2’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  260|   		}
#  261|   
#  262|-> 		retval = ext2fs_file_open2(current_fs, journal_inum,
#  263|   					   &journal_inode, 0, &journal_file);
#  264|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_false: following ‘false’ branch (when ‘use_sb == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:257:29: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: throw: if ‘ext2fs_file_open2’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  260|   		}
#  261|   
#  262|-> 		retval = ext2fs_file_open2(current_fs, journal_inum,
#  263|   					   &journal_inode, 0, &journal_file);
#  264|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:264:20: branch_true: following ‘true’ branch (when ‘retval != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  263|   					   &journal_inode, 0, &journal_file);
#  264|   		if (retval) {
#  265|-> 			com_err(argv[0], retval, "while opening ext2 file");
#  266|   			goto cleanup;
#  267|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_true: following ‘true’ branch (when ‘journal_inum != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:243:20: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:257:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:262:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:264:20: branch_true: following ‘true’ branch (when ‘retval != 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:265:25: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
#  263|   					   &journal_inode, 0, &journal_file);
#  264|   		if (retval) {
#  265|-> 			com_err(argv[0], retval, "while opening ext2 file");
#  266|   			goto cleanup;
#  267|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: throw: if ‘uuid_unparse’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  271|   		char uuid[37];
#  272|   
#  273|-> 		uuid_unparse(es->s_journal_uuid, uuid);
#  274|   		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: throw: if ‘uuid_unparse’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:273:17: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  271|   		char uuid[37];
#  272|   
#  273|-> 		uuid_unparse(es->s_journal_uuid, uuid);
#  274|   		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: throw: if ‘blkid_get_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
#  272|   
#  273|   		uuid_unparse(es->s_journal_uuid, uuid);
#  274|-> 		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)
#  276|   				journal_fn = blkid_devno_to_devname(es->s_journal_dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: throw: if ‘blkid_get_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:274:30: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  272|   
#  273|   		uuid_unparse(es->s_journal_uuid, uuid);
#  274|-> 		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)
#  276|   				journal_fn = blkid_devno_to_devname(es->s_journal_dev);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def133]
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:275:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:276:69: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: throw: if ‘blkid_devno_to_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  274|   		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)
#  276|-> 				journal_fn = blkid_devno_to_devname(es->s_journal_dev);
#  277|   		if (!journal_fn) {
#  278|   			com_err(argv[0], 0, "filesystem has no journal");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:275:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:276:69: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: throw: if ‘blkid_devno_to_devname’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:276:46: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  274|   		journal_fn = blkid_get_devname(NULL, "UUID", uuid);
#  275|   		if (!journal_fn)
#  276|-> 				journal_fn = blkid_devno_to_devname(es->s_journal_dev);
#  277|   		if (!journal_fn) {
#  278|   			com_err(argv[0], 0, "filesystem has no journal");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:275:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:276:69: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:277:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  276|   				journal_fn = blkid_devno_to_devname(es->s_journal_dev);
#  277|   		if (!journal_fn) {
#  278|-> 			com_err(argv[0], 0, "filesystem has no journal");
#  279|   			goto cleanup;
#  280|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:275:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:276:69: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:277:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:278:25: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  276|   				journal_fn = blkid_devno_to_devname(es->s_journal_dev);
#  277|   		if (!journal_fn) {
#  278|-> 			com_err(argv[0], 0, "filesystem has no journal");
#  279|   			goto cleanup;
#  280|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def137]
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
#  279|   			goto cleanup;
#  280|   		}
#  281|-> 		journal_fd = open(journal_fn, O_RDONLY, 0);
#  282|   		if (journal_fd < 0) {
#  283|   			com_err(argv[0], errno, "while opening %s for logdump",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:281:30: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  279|   			goto cleanup;
#  280|   		}
#  281|-> 		journal_fd = open(journal_fn, O_RDONLY, 0);
#  282|   		if (journal_fd < 0) {
#  283|   			com_err(argv[0], errno, "while opening %s for logdump",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:282:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:283:42: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: danger: ‘out_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  281|   		journal_fd = open(journal_fn, O_RDONLY, 0);
#  282|   		if (journal_fd < 0) {
#  283|-> 			com_err(argv[0], errno, "while opening %s for logdump",
#  284|   				journal_fn);
#  285|   			free(journal_fn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: warning[-Wanalyzer-malloc-leak]: leak of ‘out_file’
e2fsprogs-1.47.3/debugfs/logdump.c:173:12: branch_false: following ‘false’ branch (when ‘inode_spec’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:202:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:205:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:206:28: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/logdump.c:207:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:214:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:224:12: branch_false: following ‘false’ branch (when ‘journal_fn’ is NULL)...
e2fsprogs-1.47.3/debugfs/logdump.c:238:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:238:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:240:24: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:242:12: branch_false: following ‘false’ branch (when ‘journal_inum == 0’)...
e2fsprogs-1.47.3/debugfs/logdump.c:273:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:282:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/logdump.c:283:42: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/logdump.c:283:25: danger: ‘out_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  281|   		journal_fd = open(journal_fn, O_RDONLY, 0);
#  282|   		if (journal_fd < 0) {
#  283|-> 			com_err(argv[0], errno, "while opening %s for logdump",
#  284|   				journal_fn);
#  285|   			free(journal_fn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
e2fsprogs-1.47.3/debugfs/lsdel.c:115:17: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_true: following ‘true’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:115:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:115:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:115:17: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  113|   	block_buf = malloc(current_fs->blocksize * 3);
#  114|   	if (!block_buf) {
#  115|-> 		com_err("ls_deleted_inodes", ENOMEM, "while allocating block buffer");
#  116|   		goto error_out;
#  117|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  117|   	}
#  118|   
#  119|-> 	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  120|   	if (retval) {
#  121|   		com_err("ls_deleted_inodes", retval,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  117|   	}
#  118|   
#  119|-> 	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  120|   	if (retval) {
#  121|   		com_err("ls_deleted_inodes", retval,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  119|   	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  120|   	if (retval) {
#  121|-> 		com_err("ls_deleted_inodes", retval,
#  122|   			"while opening inode scan");
#  123|   		goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:121:17: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  119|   	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  120|   	if (retval) {
#  121|-> 		com_err("ls_deleted_inodes", retval,
#  122|   			"while opening inode scan");
#  123|   		goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  125|   
#  126|   	do {
#  127|-> 		retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  128|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  129|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:127:26: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  125|   
#  126|   	do {
#  127|-> 		retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  128|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  129|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  128|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  129|   	if (retval) {
#  130|-> 		com_err("ls_deleted_inodes", retval,
#  131|   			"while starting inode scan");
#  132|   		goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:130:17: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  128|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  129|   	if (retval) {
#  130|-> 		com_err("ls_deleted_inodes", retval,
#  131|   			"while starting inode scan");
#  132|   		goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
e2fsprogs-1.47.3/debugfs/lsdel.c:145:21: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:135:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:136:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:145:21: throw: if ‘ext2fs_inode_has_valid_blocks2’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:145:21: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  143|   		lsd.bad_blocks = 0;
#  144|   
#  145|-> 		if (ext2fs_inode_has_valid_blocks2(current_fs, &inode)) {
#  146|   			retval = ext2fs_block_iterate3(current_fs, ino,
#  147|   						       BLOCK_FLAG_READ_ONLY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
e2fsprogs-1.47.3/debugfs/lsdel.c:146:34: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:135:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:136:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:145:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:146:34: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:146:34: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:146:34: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  144|   
#  145|   		if (ext2fs_inode_has_valid_blocks2(current_fs, &inode)) {
#  146|-> 			retval = ext2fs_block_iterate3(current_fs, ino,
#  147|   						       BLOCK_FLAG_READ_ONLY,
#  148|   						       block_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:135:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:136:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:136:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:138:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  180|   	next:
#  181|   		do {
#  182|-> 			retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  183|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  184|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: warning[-Wanalyzer-malloc-leak]: leak of ‘delarray’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:106:20: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:135:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:136:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:136:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:138:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:182:34: danger: ‘delarray’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  180|   	next:
#  181|   		do {
#  182|-> 			retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  183|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  184|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
e2fsprogs-1.47.3/debugfs/lsdel.c:185:25: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:135:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:136:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:185:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:185:25: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  183|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  184|   		if (retval) {
#  185|-> 			com_err("ls_deleted_inodes", retval,
#  186|   				"while doing inode scan");
#  187|   			goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
e2fsprogs-1.47.3/debugfs/lsdel.c:191:15: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:191:15: throw: if ‘open_pager’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:191:15: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  189|   	}
#  190|   
#  191|-> 	out = open_pager();
#  192|   
#  193|   	fprintf(out, " Inode  Owner  Mode    Size      Blocks   Time deleted\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
e2fsprogs-1.47.3/debugfs/lsdel.c:195:9: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:195:9: throw: if ‘qsort’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:195:9: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  193|   	fprintf(out, " Inode  Owner  Mode    Size      Blocks   Time deleted\n");
#  194|   
#  195|-> 	qsort(delarray, num_delarray, sizeof(struct deleted_info),
#  196|   	      deleted_info_compare);
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
e2fsprogs-1.47.3/debugfs/lsdel.c:208:9: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/debugfs/lsdel.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:95:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:107:12: branch_false: following ‘false’ branch (when ‘delarray’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:113:38: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:113:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/lsdel.c:114:12: branch_false: following ‘false’ branch (when ‘block_buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/lsdel.c:119:18: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/lsdel.c:129:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:198:21: branch_false: following ‘false’ branch (when ‘num_delarray <= i’)...
e2fsprogs-1.47.3/debugfs/lsdel.c:207:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/lsdel.c:208:9: throw: if ‘close_pager’ throws an exception...
e2fsprogs-1.47.3/debugfs/lsdel.c:208:9: danger: ‘block_buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  206|   	}
#  207|   	fprintf(out, "%d deleted inodes found.\n", num_delarray);
#  208|-> 	close_pager(out);
#  209|   
#  210|   error_out:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
e2fsprogs-1.47.3/debugfs/ncheck.c:144:25: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:137:33: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:143:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:143:37: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:144:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:144:25: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  142|   		iw.iarray[i] = strtol(str, &tmp, 0);
#  143|   		if (*tmp && (str == argv[i] || *tmp != '>')) {
#  144|-> 			com_err("ncheck", 0, "Invalid inode number - '%s'",
#  145|   				argv[i]);
#  146|   			goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
e2fsprogs-1.47.3/debugfs/ncheck.c:148:21: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:137:33: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:148:21: throw: if ‘debugfs_read_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:148:21: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  146|   			goto error_out;
#  147|   		}
#  148|-> 		if (debugfs_read_inode(iw.iarray[i], &inode, *argv))
#  149|   			goto error_out;
#  150|   		if (LINUX_S_ISDIR(inode.i_mode))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
e2fsprogs-1.47.3/debugfs/ncheck.c:158:18: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:158:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:158:18: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  156|   	iw.num_inodes = argc;
#  157|   
#  158|-> 	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  159|   	if (retval) {
#  160|   		com_err("ncheck", retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
e2fsprogs-1.47.3/debugfs/ncheck.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:160:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:160:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:160:17: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  158|   	retval = ext2fs_open_inode_scan(current_fs, 0, &scan);
#  159|   	if (retval) {
#  160|-> 		com_err("ncheck", retval, "while opening inode scan");
#  161|   		goto error_out;
#  162|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
e2fsprogs-1.47.3/debugfs/ncheck.c:165:26: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:165:26: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:165:26: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  163|   
#  164|   	do {
#  165|-> 		retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  166|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  167|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
e2fsprogs-1.47.3/debugfs/ncheck.c:168:17: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:167:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:168:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:168:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:168:17: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  166|   	} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  167|   	if (retval) {
#  168|-> 		com_err("ncheck", retval, "while starting inode scan");
#  169|   		goto error_out;
#  170|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
e2fsprogs-1.47.3/debugfs/ncheck.c:191:26: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:167:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:172:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:173:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:174:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:174:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:180:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:180:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:183:22: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:183:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:186:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:191:26: throw: if ‘ext2fs_dir_iterate’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:191:26: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  189|   		iw.get_pathname_failed = 0;
#  190|   
#  191|-> 		retval = ext2fs_dir_iterate(current_fs, ino, 0, 0,
#  192|   					    ncheck_proc, &iw);
#  193|   		ext2fs_free_mem(&iw.parent);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
e2fsprogs-1.47.3/debugfs/ncheck.c:205:34: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:167:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:172:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:173:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:174:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:174:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:175:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:205:34: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:205:34: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  203|   	next:
#  204|   		do {
#  205|-> 			retval = ext2fs_get_next_inode(scan, &ino, &inode);
#  206|   		} while (retval == EXT2_ET_BAD_BLOCK_IN_INODE_TABLE);
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
e2fsprogs-1.47.3/debugfs/ncheck.c:209:25: warning[-Wanalyzer-malloc-leak]: leak of ‘iw.iarray’
e2fsprogs-1.47.3/debugfs/ncheck.c:117:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:122:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:122:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:125:14: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:127:21: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/ncheck.c:128:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:133:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:136:19: branch_false: following ‘false’ branch (when ‘i >= argc’)...
e2fsprogs-1.47.3/debugfs/ncheck.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:159:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:167:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:172:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:173:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:174:22: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:174:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:175:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:206:26: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:208:20: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:208:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/ncheck.c:209:25: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/ncheck.c:209:25: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/ncheck.c:209:25: danger: ‘iw.iarray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  207|   
#  208|   		if (retval) {
#  209|-> 			com_err("ncheck", retval,
#  210|   				"while doing inode scan");
#  211|   			goto error_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
e2fsprogs-1.47.3/debugfs/set_fields.c:742:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(sz)’
e2fsprogs-1.47.3/debugfs/set_fields.c:727:18: enter_function: entry to ‘parse_inode_csum’
e2fsprogs-1.47.3/debugfs/set_fields.c:735:29: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/set_fields.c:738:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘parse_inode_csum’
e2fsprogs-1.47.3/debugfs/set_fields.c:742:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:742:26: throw: if ‘ext2fs_read_inode_full’ throws an exception...
e2fsprogs-1.47.3/debugfs/set_fields.c:742:26: danger: ‘malloc(sz)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  740|   			goto out;
#  741|   
#  742|-> 		retval = ext2fs_read_inode_full(current_fs, set_ino,
#  743|   				     (struct ext2_inode *) tmp_inode,
#  744|   				     sz);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
e2fsprogs-1.47.3/debugfs/set_fields.c:1032:42: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*current_fs.blocksize)’
e2fsprogs-1.47.3/debugfs/set_fields.c:997:6: enter_function: entry to ‘do_set_mmp_value’
e2fsprogs-1.47.3/debugfs/set_fields.c:1012:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/set_fields.c:1015:23: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:1015:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/set_fields.c:1020:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:1020:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/set_fields.c:1024:27: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:1025:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/debugfs/set_fields.c:1026:41: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:1026:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_mmp_value’
e2fsprogs-1.47.3/debugfs/set_fields.c:1032:42: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/set_fields.c:1031:26: throw: if ‘ext2fs_mmp_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/set_fields.c:1032:42: danger: ‘malloc((long unsigned int)*current_fs.blocksize)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 1030|   		}
# 1031|   		retval = ext2fs_mmp_read(current_fs,
# 1032|-> 					 current_fs->super->s_mmp_block, mmp_s);
# 1033|   		if (retval) {
# 1034|   			com_err(argv[0], retval, "reading MMP block %llu.\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  190|   	}
#  191|   
#  192|-> 	if (check_fs_open(argv[0]))
#  193|   		goto out2;
#  194|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  190|   	}
#  191|   
#  192|-> 	if (check_fs_open(argv[0]))
#  193|   		goto out2;
#  194|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: throw: if ‘string_to_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  193|   		goto out2;
#  194|   
#  195|-> 	ino = string_to_inode(argv[optind]);
#  196|   	if (!ino)
#  197|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: throw: if ‘string_to_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  193|   		goto out2;
#  194|   
#  195|-> 	ino = string_to_inode(argv[optind]);
#  196|   	if (!ino)
#  197|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: throw: if ‘ext2fs_xattrs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  197|   		goto out2;
#  198|   
#  199|-> 	err = ext2fs_xattrs_open(current_fs, ino, &h);
#  200|   	if (err)
#  201|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: throw: if ‘ext2fs_xattrs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  197|   		goto out2;
#  198|   
#  199|-> 	err = ext2fs_xattrs_open(current_fs, ino, &h);
#  200|   	if (err)
#  201|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: throw: if ‘ext2fs_xattrs_flags’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  201|   		goto out2;
#  202|   
#  203|-> 	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
#  204|   	if (err)
#  205|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: throw: if ‘ext2fs_xattrs_flags’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  201|   		goto out2;
#  202|   
#  203|-> 	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
#  204|   	if (err)
#  205|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: throw: if ‘ext2fs_xattrs_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  205|   		goto out;
#  206|   
#  207|-> 	err = ext2fs_xattrs_read(h);
#  208|   	if (err)
#  209|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: throw: if ‘ext2fs_xattrs_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  205|   		goto out;
#  206|   
#  207|-> 	err = ext2fs_xattrs_read(h);
#  208|   	if (err)
#  209|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:211:40: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: throw: if ‘ext2fs_xattr_get’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  209|   		goto out;
#  210|   
#  211|-> 	err = ext2fs_xattr_get(h, argv[optind + 1], (void **)&buf, &buflen);
#  212|   	if (err)
#  213|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:155:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:156:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:158:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:160:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:161:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:184:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:192:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:195:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:196:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:199:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:203:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:211:40: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: throw: if ‘ext2fs_xattr_get’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:211:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  209|   		goto out;
#  210|   
#  211|-> 	err = ext2fs_xattr_get(h, argv[optind + 1], (void **)&buf, &buflen);
#  212|   	if (err)
#  213|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  276|   	}
#  277|   
#  278|-> 	if (check_fs_open(argv[0]))
#  279|   		goto out2;
#  280|   	if (check_fs_read_write(argv[0]))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: throw: if ‘check_fs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:13: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  276|   	}
#  277|   
#  278|-> 	if (check_fs_open(argv[0]))
#  279|   		goto out2;
#  280|   	if (check_fs_read_write(argv[0]))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: throw: if ‘check_fs_read_write’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  278|   	if (check_fs_open(argv[0]))
#  279|   		goto out2;
#  280|-> 	if (check_fs_read_write(argv[0]))
#  281|   		goto out2;
#  282|   	if (check_fs_bitmaps(argv[0]))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: throw: if ‘check_fs_read_write’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  278|   	if (check_fs_open(argv[0]))
#  279|   		goto out2;
#  280|-> 	if (check_fs_read_write(argv[0]))
#  281|   		goto out2;
#  282|   	if (check_fs_bitmaps(argv[0]))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: throw: if ‘check_fs_bitmaps’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  280|   	if (check_fs_read_write(argv[0]))
#  281|   		goto out2;
#  282|-> 	if (check_fs_bitmaps(argv[0]))
#  283|   		goto out2;
#  284|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: throw: if ‘check_fs_bitmaps’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
#  280|   	if (check_fs_read_write(argv[0]))
#  281|   		goto out2;
#  282|-> 	if (check_fs_bitmaps(argv[0]))
#  283|   		goto out2;
#  284|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def187]
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: throw: if ‘string_to_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  283|   		goto out2;
#  284|   
#  285|-> 	ino = string_to_inode(argv[optind]);
#  286|   	if (!ino)
#  287|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: throw: if ‘string_to_inode’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  283|   		goto out2;
#  284|   
#  285|-> 	ino = string_to_inode(argv[optind]);
#  286|   	if (!ino)
#  287|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: throw: if ‘ext2fs_xattrs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
#  287|   		goto out2;
#  288|   
#  289|-> 	err = ext2fs_xattrs_open(current_fs, ino, &h);
#  290|   	if (err)
#  291|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: throw: if ‘ext2fs_xattrs_open’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  287|   		goto out2;
#  288|   
#  289|-> 	err = ext2fs_xattrs_open(current_fs, ino, &h);
#  290|   	if (err)
#  291|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: throw: if ‘ext2fs_xattrs_flags’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  291|   		goto out2;
#  292|   
#  293|-> 	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
#  294|   	if (err)
#  295|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: throw: if ‘ext2fs_xattrs_flags’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  291|   		goto out2;
#  292|   
#  293|-> 	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
#  294|   	if (err)
#  295|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def193]
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: throw: if ‘ext2fs_xattrs_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  295|   		goto out;
#  296|   
#  297|-> 	err = ext2fs_xattrs_read(h);
#  298|   	if (err)
#  299|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: throw: if ‘ext2fs_xattrs_read’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  295|   		goto out;
#  296|   
#  297|-> 	err = ext2fs_xattrs_read(h);
#  298|   	if (err)
#  299|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:239:6: enter_function: entry to ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:298:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:302:48: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:302:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:305:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: throw: if ‘ext2fs_xattr_set’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: danger: ‘fp’ leaks here; was opened at [(6)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/5)
#  309|   	}
#  310|   
#  311|-> 	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|   	ext2fs_xattrs_close(&h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/xattrs.c:239:6: enter_function: entry to ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:298:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:302:48: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:302:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:305:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: throw: if ‘ext2fs_xattr_set’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: danger: ‘buf’ leaks here; was allocated at [(27)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/26)
#  309|   	}
#  310|   
#  311|-> 	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|   	ext2fs_xattrs_close(&h);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:239:6: enter_function: entry to ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:298:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:302:48: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:302:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:305:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: throw: if ‘ext2fs_xattr_set’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:311:15: danger: ‘fp’ leaks here; was allocated at [(6)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/5)
#  309|   	}
#  310|   
#  311|-> 	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|   	ext2fs_xattrs_close(&h);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def198]
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: throw: if ‘ext2fs_xattrs_close’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  311|   	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|-> 	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|   		com_err(argv[0], err, "while setting extended attribute");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/xattrs.c:239:6: enter_function: entry to ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:298:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:302:48: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:302:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:305:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: throw: if ‘ext2fs_xattrs_close’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: danger: ‘buf’ leaks here; was allocated at [(27)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/26)
#  311|   	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|-> 	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|   		com_err(argv[0], err, "while setting extended attribute");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: throw: if ‘ext2fs_xattrs_close’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:313:9: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/4)
#  311|   	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
#  312|   out:
#  313|-> 	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|   		com_err(argv[0], err, "while setting extended attribute");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def201]
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_resource: opened here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:314:12: branch_true: following ‘true’ branch (when ‘err != 0’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
#  313|   	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|-> 		com_err(argv[0], err, "while setting extended attribute");
#  316|   out2:
#  317|   	if (fp) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/xattrs.c:239:6: enter_function: entry to ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:294:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:297:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:298:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:301:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:302:48: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:302:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘do_set_xattr’
e2fsprogs-1.47.3/debugfs/xattrs.c:305:26: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:314:12: branch_true: following ‘true’ branch (when ‘err != 0’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: danger: ‘buf’ leaks here; was allocated at [(27)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/26)
#  313|   	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|-> 		com_err(argv[0], err, "while setting extended attribute");
#  316|   out2:
#  317|   	if (fp) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
e2fsprogs-1.47.3/debugfs/xattrs.c:252:16: branch_true: following ‘true’ branch (when ‘i != -1’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:253:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:255:28: branch_false: following ‘false’ branch (when ‘fp’ is NULL)...
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:257:30: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:258:28: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:271:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:278:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:280:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:280:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:282:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:282:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:285:35: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:289:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:290:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/xattrs.c:293:15: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:314:12: branch_true: following ‘true’ branch (when ‘err != 0’)...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/debugfs/xattrs.c:315:17: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
#  313|   	ext2fs_xattrs_close(&h);
#  314|   	if (err)
#  315|-> 		com_err(argv[0], err, "while setting extended attribute");
#  316|   out2:
#  317|   	if (fp) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
e2fsprogs-1.47.3/debugfs/zap.c:148:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/zap.c:42:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:44:13: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:44:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:47:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:101:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:106:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:108:12: branch_true: following ‘true’ branch (when ‘length < 0’)...
e2fsprogs-1.47.3/debugfs/zap.c:109:36: branch_true: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:110:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:115:21: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:115:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:124:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:125:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:128:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:128:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
e2fsprogs-1.47.3/debugfs/zap.c:142:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:142:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/zap.c:143:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/zap.c:148:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:148:19: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/debugfs/zap.c:148:19: danger: ‘buf’ leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  146|   	}
#  147|   
#  148|-> 	errcode = io_channel_read_blk64(current_fs->io, block, 1, buf);
#  149|   	if (errcode) {
#  150|   		com_err(argv[0], errcode,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
e2fsprogs-1.47.3/debugfs/zap.c:232:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/debugfs/zap.c:185:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:188:9: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:208:17: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:209:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/debugfs/zap.c:212:12: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:212:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
e2fsprogs-1.47.3/debugfs/zap.c:226:32: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:226:15: acquire_memory: allocated here
e2fsprogs-1.47.3/debugfs/zap.c:227:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/debugfs/zap.c:232:19: branch_false: ...to here
e2fsprogs-1.47.3/debugfs/zap.c:232:19: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/debugfs/zap.c:232:19: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  230|   	}
#  231|   
#  232|-> 	errcode = io_channel_read_blk64(current_fs->io, block, 1, buf);
#  233|   	if (errcode) {
#  234|   		com_err(argv[0], errcode,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def206]
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/e2fsck/badblocks.c:44:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/badblocks.c:54:12: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:54:12: branch_false: following ‘false’ branch (when ‘replace_bad_blocks != 0’)...
e2fsprogs-1.47.3/e2fsck/badblocks.c:68:12: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:68:12: branch_true: following ‘true’ branch (when ‘bad_blocks_file’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/badblocks.c:69:21: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:69:21: acquire_resource: opened here
e2fsprogs-1.47.3/e2fsck/badblocks.c:70:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: throw: if ‘ext2fs_read_bb_FILE’ throws an exception...
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: danger: ‘f’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   86|   		}
#   87|   	}
#   88|-> 	retval = ext2fs_read_bb_FILE(fs, f, &bb_list, invalid_block);
#   89|   	if (bad_blocks_file)
#   90|   		fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/e2fsck/badblocks.c:44:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/badblocks.c:54:12: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:54:12: branch_false: following ‘false’ branch (when ‘replace_bad_blocks != 0’)...
e2fsprogs-1.47.3/e2fsck/badblocks.c:68:12: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:68:12: branch_true: following ‘true’ branch (when ‘bad_blocks_file’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/badblocks.c:69:21: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:69:21: acquire_memory: allocated here
e2fsprogs-1.47.3/e2fsck/badblocks.c:70:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: throw: if ‘ext2fs_read_bb_FILE’ throws an exception...
e2fsprogs-1.47.3/e2fsck/badblocks.c:88:18: danger: ‘f’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   86|   		}
#   87|   	}
#   88|-> 	retval = ext2fs_read_bb_FILE(fs, f, &bb_list, invalid_block);
#   89|   	if (bad_blocks_file)
#   90|   		fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:270:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(56)’
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:221:18: enter_function: entry to ‘get_encryption_policy_id’
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:237:12: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:237:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:243:21: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:245:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:225:26: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:267:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_encryption_policy_id’
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:270:21: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/encrypted_files.c:270:21: danger: ‘malloc(56)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  268|   	if (retval)
#  269|   		goto out;
#  270|-> 	policy_id = info->next_policy_id++;
#  271|   	entry->policy_id = policy_id;
#  272|   	entry->policy = policy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
e2fsprogs-1.47.3/e2fsck/extents.c:68:18: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:28:11: enter_function: entry to ‘e2fsck_rebuild_extents_later’
e2fsprogs-1.47.3/e2fsck/extents.c:37:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: call_function: calling ‘e2fsck_rebuild_extents’ from ‘e2fsck_rebuild_extents_later’
#   66|   	errcode_t		retval;
#   67|   
#   68|-> 	retval = ext2fs_extent_open(fs, list->ino, &handle);
#   69|   	if (retval)
#   70|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
e2fsprogs-1.47.3/e2fsck/extents.c:72:18: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:28:11: enter_function: entry to ‘e2fsck_rebuild_extents_later’
e2fsprogs-1.47.3/e2fsck/extents.c:37:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: call_function: calling ‘e2fsck_rebuild_extents’ from ‘e2fsck_rebuild_extents_later’
#   70|   		return retval;
#   71|   
#   72|-> 	retval = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent);
#   73|   	if (retval)
#   74|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
e2fsprogs-1.47.3/e2fsck/extents.c:87:25: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:28:11: enter_function: entry to ‘e2fsck_rebuild_extents_later’
e2fsprogs-1.47.3/e2fsck/extents.c:37:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: call_function: calling ‘e2fsck_rebuild_extents’ from ‘e2fsck_rebuild_extents_later’
#   85|   #endif
#   86|   			list->blocks_freed++;
#   87|-> 			ext2fs_block_alloc_stats2(fs, extent.e_pblk, -1);
#   88|   			goto next;
#   89|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
e2fsprogs-1.47.3/e2fsck/extents.c:130:26: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:28:11: enter_function: entry to ‘e2fsck_rebuild_extents_later’
e2fsprogs-1.47.3/e2fsck/extents.c:37:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: call_function: calling ‘e2fsck_rebuild_extents’ from ‘e2fsck_rebuild_extents_later’
#  128|   		list->count++;
#  129|   next:
#  130|-> 		retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT, &extent);
#  131|   	} while (retval == 0);
#  132|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
e2fsprogs-1.47.3/e2fsck/extents.c:359:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:28:11: enter_function: entry to ‘e2fsck_rebuild_extents_later’
e2fsprogs-1.47.3/e2fsck/extents.c:37:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/extents.c:38:24: call_function: calling ‘e2fsck_rebuild_extents’ from ‘e2fsck_rebuild_extents_later’
#  357|   	list->ino = ino;
#  358|   	list->ext_read = 0;
#  359|-> 	e2fsck_read_inode_full(ctx, ino, EXT2_INODE(&inode), sizeof(inode),
#  360|   			       "rebuild_extents");
#  361|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
e2fsprogs-1.47.3/e2fsck/extents.c:444:25: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:620:6: enter_function: entry to ‘e2fsck_pass1e’
e2fsprogs-1.47.3/e2fsck/extents.c:622:9: call_function: calling ‘rebuild_extents’ from ‘e2fsck_pass1e’
#  442|   		pctx.ino = ino;
#  443|   		if (first) {
#  444|-> 			fix_problem(ctx, pr_header, &pctx);
#  445|   			first = 0;
#  446|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
e2fsprogs-1.47.3/e2fsck/extents.c:458:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:620:6: enter_function: entry to ‘e2fsck_pass1e’
e2fsprogs-1.47.3/e2fsck/extents.c:622:9: call_function: calling ‘rebuild_extents’ from ‘e2fsck_pass1e’
#  456|   					ino);
#  457|   	}
#  458|-> 	end_problem_latch(ctx, PR_LATCH_OPTIMIZE_EXT);
#  459|   
#  460|   	ext2fs_free_inode_bitmap(ctx->inodes_to_rebuild);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
e2fsprogs-1.47.3/e2fsck/extents.c:460:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:620:6: enter_function: entry to ‘e2fsck_pass1e’
e2fsprogs-1.47.3/e2fsck/extents.c:622:9: call_function: calling ‘rebuild_extents’ from ‘e2fsck_pass1e’
#  458|   	end_problem_latch(ctx, PR_LATCH_OPTIMIZE_EXT);
#  459|   
#  460|-> 	ext2fs_free_inode_bitmap(ctx->inodes_to_rebuild);
#  461|   	ctx->inodes_to_rebuild = NULL;
#  462|   	ext2fs_free_mem(&list.extents);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
e2fsprogs-1.47.3/e2fsck/journal.c:604:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)inode_len)’
e2fsprogs-1.47.3/e2fsck/journal.c:860:12: enter_function: entry to ‘ext4_fc_replay’
e2fsprogs-1.47.3/e2fsck/journal.c:869:12: branch_false: following ‘false’ branch (when ‘pass != 0’)...
e2fsprogs-1.47.3/e2fsck/journal.c:874:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/journal.c:874:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/journal.c:877:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/journal.c:903:27: branch_true: following ‘true’ branch (when ‘cur < end’)...
e2fsprogs-1.47.3/e2fsck/journal.c:904:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/journal.c:907:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/journal.c:911:17: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/journal.c:927:31: call_function: calling ‘ext4_fc_handle_inode’ from ‘ext4_fc_replay’
#  602|   	struct extent_list *extent_list = &ctx->fc_replay_state.fc_extent_list;
#  603|   
#  604|-> 	if (extent_list->ino == ino || extent_list->ino == 0)
#  605|   		return;
#  606|   	e2fsck_rewrite_extent_tree(ctx, extent_list);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def218]
e2fsprogs-1.47.3/e2fsck/logfile.c:62:9: warning[-Wanalyzer-null-argument]: use of NULL ‘s.s’ where non-null expected
e2fsprogs-1.47.3/e2fsck/logfile.c:352:6: enter_function: entry to ‘set_up_logging’
e2fsprogs-1.47.3/e2fsck/logfile.c:354:21: call_function: calling ‘set_up_log_file’ from ‘set_up_logging’
#   60|   		}
#   61|   	}
#   62|-> 	memcpy(s->s + s->end, a, len);
#   63|   	s->end += len;
#   64|   	s->s[s->end] = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
e2fsprogs-1.47.3/e2fsck/logfile.c:141:17: warning[-Wanalyzer-malloc-leak]: leak of ‘s.s’
e2fsprogs-1.47.3/e2fsck/logfile.c:352:6: enter_function: entry to ‘set_up_logging’
e2fsprogs-1.47.3/e2fsck/logfile.c:354:21: call_function: calling ‘set_up_log_file’ from ‘set_up_logging’
#  139|   #else
#  140|   #ifdef HAVE_GETPWUID_R
#  141|-> 		getpwuid_r(getuid(), &pw_struct, buf, sizeof(buf), &pw);
#  142|   #else
#  143|   		pw = getpwuid(getuid());

Error: GCC_ANALYZER_WARNING (CWE-688): [#def220]
e2fsprogs-1.47.3/e2fsck/logfile.c:317:53: warning[-Wanalyzer-null-argument]: use of NULL ‘s.s’ where non-null expected
e2fsprogs-1.47.3/e2fsck/logfile.c:352:6: enter_function: entry to ‘set_up_logging’
e2fsprogs-1.47.3/e2fsck/logfile.c:354:21: call_function: calling ‘set_up_log_file’ from ‘set_up_logging’
#  315|   
#  316|   	if (log_dir && log_dir[0]) {
#  317|-> 		alloc_string(&s1, strlen(log_dir) + strlen(s.s) + 2);
#  318|   		append_string(&s1, log_dir, 0);
#  319|   		append_string(&s1, "/", 1);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def221]
e2fsprogs-1.47.3/e2fsck/logfile.c:317:53: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*s.s’
e2fsprogs-1.47.3/e2fsck/logfile.c:352:6: enter_function: entry to ‘set_up_logging’
e2fsprogs-1.47.3/e2fsck/logfile.c:354:21: call_function: calling ‘set_up_log_file’ from ‘set_up_logging’
#  315|   
#  316|   	if (log_dir && log_dir[0]) {
#  317|-> 		alloc_string(&s1, strlen(log_dir) + strlen(s.s) + 2);
#  318|   		append_string(&s1, log_dir, 0);
#  319|   		append_string(&s1, "/", 1);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def222]
e2fsprogs-1.47.3/e2fsck/pass1.c:2695:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘entry_quota_blocks’
e2fsprogs-1.47.3/e2fsck/pass1.c:2506:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2516:14: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2516:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2517:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2516:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2518:21: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2516:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2524:14: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2554:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2590:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2622:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2627:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2635:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2638:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2644:22: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2692:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2692:40: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2692:29: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:2695:38: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:2695:38: danger: use of uninitialized value ‘entry_quota_blocks’ here
# 2693|   				goto clear_extattr;
# 2694|   
# 2695|-> 			quota_blocks += entry_quota_blocks;
# 2696|   			quota_inodes++;
# 2697|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
e2fsprogs-1.47.3/e2fsck/pass1.c:4209:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/pass1.c:4148:13: enter_function: entry to ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:39: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:24: call_function: inlined call to ‘ext2fs_get_mem’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4206:9: call_function: inlined call to ‘ext2fs_mark_super_dirty’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4209:9: throw: if ‘fix_problem’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1.c:4209:9: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 4207|   	fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
# 4208|   	pctx.blk2 = *new_block;
# 4209|-> 	fix_problem(ctx, (old_block ? PR_1_RELOC_FROM_TO :
# 4210|   			  PR_1_RELOC_TO), &pctx);
# 4211|   	pctx.blk2 = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
e2fsprogs-1.47.3/e2fsck/pass1.c:4216:40: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/pass1.c:4148:13: enter_function: entry to ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:39: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:24: call_function: inlined call to ‘ext2fs_get_mem’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4206:9: call_function: inlined call to ‘ext2fs_mark_super_dirty’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4212:21: branch_true: following ‘true’ branch (when ‘i < num’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4213:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4215:20: branch_true: following ‘true’ branch (when ‘old_block != 0’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4217:36: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4216:40: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1.c:4216:40: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 4214|   		ext2fs_mark_block_bitmap2(ctx->block_found_map, (*new_block)+i);
# 4215|   		if (old_block) {
# 4216|-> 			pctx.errcode = io_channel_read_blk64(fs->io,
# 4217|   				   old_block + i, 1, buf);
# 4218|   			if (pctx.errcode)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
e2fsprogs-1.47.3/e2fsck/pass1.c:4225:40: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/pass1.c:4148:13: enter_function: entry to ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:39: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:24: call_function: inlined call to ‘ext2fs_get_mem’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4206:9: call_function: inlined call to ‘ext2fs_mark_super_dirty’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4212:21: branch_true: following ‘true’ branch (when ‘i < num’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4213:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4215:20: branch_false: following ‘false’ branch (when ‘old_block == 0’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4224:36: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4225:40: throw: if ‘ext2fs_zero_blocks2’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1.c:4225:40: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
# 4223|   		} else {
# 4224|   			pctx.blk = (*new_block) + i;
# 4225|-> 			pctx.errcode = ext2fs_zero_blocks2(fs, pctx.blk, 1,
# 4226|   							   NULL, NULL);
# 4227|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
e2fsprogs-1.47.3/e2fsck/pass1.c:4230:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/pass1.c:4148:13: enter_function: entry to ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:39: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:24: call_function: inlined call to ‘ext2fs_get_mem’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4206:9: call_function: inlined call to ‘ext2fs_mark_super_dirty’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4212:21: branch_true: following ‘true’ branch (when ‘i < num’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4213:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4215:20: branch_false: following ‘false’ branch (when ‘old_block == 0’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4224:36: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4229:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4230:25: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4230:25: throw: if ‘fix_problem’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1.c:4230:25: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
# 4228|   
# 4229|   		if (pctx.errcode)
# 4230|-> 			fix_problem(ctx, PR_1_RELOC_WRITE_ERR, &pctx);
# 4231|   	}
# 4232|   	ext2fs_free_mem(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
e2fsprogs-1.47.3/e2fsck/pass1b.c:946:13: warning[-Wanalyzer-malloc-leak]: leak of ‘cs.buf’
e2fsprogs-1.47.3/e2fsck/pass1b.c:914:18: enter_function: entry to ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:937:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:946:13: throw: if ‘ext2fs_inode_has_valid_blocks2’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1b.c:946:13: danger: ‘cs.buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  944|   	pctx.ino = ino;
#  945|   	pctx.str = "clone_file";
#  946|-> 	if (ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(&dp->inode)))
#  947|   		pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf,
#  948|   						     clone_file_block, &cs);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
e2fsprogs-1.47.3/e2fsck/pass1b.c:947:32: warning[-Wanalyzer-malloc-leak]: leak of ‘cs.buf’
e2fsprogs-1.47.3/e2fsck/pass1b.c:914:18: enter_function: entry to ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:937:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:946:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass1b.c:947:32: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1b.c:947:32: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass1b.c:947:32: danger: ‘cs.buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  945|   	pctx.str = "clone_file";
#  946|   	if (ext2fs_inode_has_valid_blocks2(fs, EXT2_INODE(&dp->inode)))
#  947|-> 		pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf,
#  948|   						     clone_file_block, &cs);
#  949|   	deferred_dec_badcount(&cs);

Error: GCC_ANALYZER_WARNING (CWE-465): [#def229]
e2fsprogs-1.47.3/e2fsck/pass2.c:1268:27: warning[-Wanalyzer-deref-before-check]: check of ‘dx_db’ for NULL after already dereferencing it
e2fsprogs-1.47.3/e2fsck/pass2.c:1089:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass2.c:1092:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass2.c:1107:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass2.c:1110:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass2.c:1134:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass2.c:1140:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass2.c:1218:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass2.c:1219:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass2.c:1230:26: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass2.c:1268:27: danger: pointer ‘dx_db’ is checked for NULL here but it was already dereferenced at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1266|   			dx_db->type = DX_DIRBLOCK_NODE;
# 1267|   		}
# 1268|-> 		is_leaf = dx_db ? (dx_db->type == DX_DIRBLOCK_LEAF) : 0;
# 1269|   	}
# 1270|   out_htree:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
e2fsprogs-1.47.3/e2fsck/pass5.c:106:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx_26(D)->fs.blocksize)’
e2fsprogs-1.47.3/e2fsck/pass5.c:82:13: enter_function: entry to ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:95:13: call_function: inlined call to ‘ext2fs_test_ib_dirty’ from ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:95:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:98:27: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:99:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:106:9: throw: if ‘clear_problem_context’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass5.c:106:9: danger: ‘malloc((long unsigned int)*ctx_26(D)->fs.blocksize)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  104|   	}
#  105|   
#  106|-> 	clear_problem_context(&pctx);
#  107|   	for (i = 0; i < ctx->fs->group_desc_count; i++) {
#  108|   		if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_INODE_UNINIT))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
e2fsprogs-1.47.3/e2fsck/pass5.c:107:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx_26(D)->fs.blocksize)’
e2fsprogs-1.47.3/e2fsck/pass5.c:82:13: enter_function: entry to ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:91:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:95:13: call_function: inlined call to ‘ext2fs_test_ib_dirty’ from ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:95:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:98:27: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:99:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘check_inode_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:107:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:108:21: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:108:21: throw: if ‘ext2fs_bg_flags_test’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass5.c:107:25: danger: ‘malloc((long unsigned int)*ctx_26(D)->fs.blocksize)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  105|   
#  106|   	clear_problem_context(&pctx);
#  107|-> 	for (i = 0; i < ctx->fs->group_desc_count; i++) {
#  108|   		if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_INODE_UNINIT))
#  109|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
e2fsprogs-1.47.3/e2fsck/pass5.c:160:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx_30(D)->fs.blocksize)’
e2fsprogs-1.47.3/e2fsck/pass5.c:136:13: enter_function: entry to ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:145:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:149:13: call_function: inlined call to ‘ext2fs_test_bb_dirty’ from ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:149:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:152:27: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:153:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:160:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:160:9: throw: if ‘clear_problem_context’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass5.c:160:9: danger: ‘malloc((long unsigned int)*ctx_30(D)->fs.blocksize)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  158|   	}
#  159|   
#  160|-> 	clear_problem_context(&pctx);
#  161|   	for (i = 0; i < ctx->fs->group_desc_count; i++) {
#  162|   		if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_BLOCK_UNINIT))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
e2fsprogs-1.47.3/e2fsck/pass5.c:161:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx_30(D)->fs.blocksize)’
e2fsprogs-1.47.3/e2fsck/pass5.c:136:13: enter_function: entry to ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:145:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:149:13: call_function: inlined call to ‘ext2fs_test_bb_dirty’ from ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:149:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:152:27: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:153:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘check_block_bitmap_checksum’
e2fsprogs-1.47.3/e2fsck/pass5.c:160:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:161:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/pass5.c:162:21: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass5.c:162:21: throw: if ‘ext2fs_bg_flags_test’ throws an exception...
e2fsprogs-1.47.3/e2fsck/pass5.c:161:25: danger: ‘malloc((long unsigned int)*ctx_30(D)->fs.blocksize)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  159|   
#  160|   	clear_problem_context(&pctx);
#  161|-> 	for (i = 0; i < ctx->fs->group_desc_count; i++) {
#  162|   		if (ext2fs_bg_flags_test(ctx->fs, i, EXT2_BG_BLOCK_UNINIT))
#  163|   			continue;

Error: CPPCHECK_WARNING (CWE-476): [#def234]
e2fsprogs-1.47.3/e2fsck/rehash.c:826: warning[nullPointer]: Possible null pointer dereference: limit
#  824|   			c2--;
#  825|   		}
#  826|-> 		limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  827|   		limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  828|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
e2fsprogs-1.47.3/e2fsck/rehash.c:826:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘limit’
e2fsprogs-1.47.3/e2fsck/rehash.c:772:18: enter_function: entry to ‘calculate_tree’
e2fsprogs-1.47.3/e2fsck/rehash.c:793:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/rehash.c:804:33: call_function: inlined call to ‘ext2fs_htree_intnode_maxrecs’ from ‘calculate_tree’
e2fsprogs-1.47.3/e2fsck/rehash.c:804:19: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/rehash.c:805:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:806:17: release_memory: ‘limit’ is NULL
e2fsprogs-1.47.3/e2fsck/rehash.c:808:27: branch_false: following ‘false’ branch (when ‘i >= nblks’)...
e2fsprogs-1.47.3/e2fsck/rehash.c:826:32: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:826:32: release_memory: ‘limit’ is NULL
e2fsprogs-1.47.3/e2fsck/rehash.c:826:32: danger: dereference of NULL ‘limit’
#  824|   			c2--;
#  825|   		}
#  826|-> 		limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  827|   		limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  828|   	} else {

Error: CPPCHECK_WARNING (CWE-476): [#def236]
e2fsprogs-1.47.3/e2fsck/rehash.c:827: warning[nullPointer]: Possible null pointer dereference: limit
#  825|   		}
#  826|   		limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  827|-> 		limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  828|   	} else {
#  829|   		c2 = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def237]
e2fsprogs-1.47.3/e2fsck/rehash.c:869: warning[nullPointer]: Possible null pointer dereference: int_limit
#  867|   			c3--;
#  868|   		}
#  869|-> 		int_limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  870|   		int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  871|   

Error: CPPCHECK_WARNING (CWE-476): [#def238]
e2fsprogs-1.47.3/e2fsck/rehash.c:869: warning[nullPointer]: Possible null pointer dereference: limit
#  867|   			c3--;
#  868|   		}
#  869|-> 		int_limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  870|   		int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  871|   

Error: CPPCHECK_WARNING (CWE-476): [#def239]
e2fsprogs-1.47.3/e2fsck/rehash.c:870: warning[nullPointer]: Possible null pointer dereference: int_limit
#  868|   		}
#  869|   		int_limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  870|-> 		int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  871|   
#  872|   		limit->count = ext2fs_cpu_to_le16(limit->limit - c3);

Error: CPPCHECK_WARNING (CWE-476): [#def240]
e2fsprogs-1.47.3/e2fsck/rehash.c:870: warning[nullPointer]: Possible null pointer dereference: limit
#  868|   		}
#  869|   		int_limit->count = ext2fs_cpu_to_le16(limit->limit - c2);
#  870|-> 		int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  871|   
#  872|   		limit->count = ext2fs_cpu_to_le16(limit->limit - c3);

Error: CPPCHECK_WARNING (CWE-476): [#def241]
e2fsprogs-1.47.3/e2fsck/rehash.c:872: warning[nullPointer]: Possible null pointer dereference: limit
#  870|   		int_limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  871|   
#  872|-> 		limit->count = ext2fs_cpu_to_le16(limit->limit - c3);
#  873|   		limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  874|   

Error: CPPCHECK_WARNING (CWE-476): [#def242]
e2fsprogs-1.47.3/e2fsck/rehash.c:873: warning[nullPointer]: Possible null pointer dereference: limit
#  871|   
#  872|   		limit->count = ext2fs_cpu_to_le16(limit->limit - c3);
#  873|-> 		limit->limit = ext2fs_cpu_to_le16(limit->limit);
#  874|   
#  875|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fd.buf’
e2fsprogs-1.47.3/e2fsck/rehash.c:985:11: enter_function: entry to ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1007:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1011:24: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1012:18: call_function: calling ‘ext2fs_get_array’ from ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1012:18: return_function: returning to ‘e2fsck_rehash_dir’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/e2fsck/rehash.c:1014:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/rehash.c:1017:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: danger: ‘fd.buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1032|   retry_nohash:
# 1033|   	/* Read in the entire directory into memory */
# 1034|-> 	retval = ext2fs_block_iterate3(fs, ino, 0, 0,
# 1035|   				       fill_dir_block, &fd);
# 1036|   	if (fd.err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fd.harray’
e2fsprogs-1.47.3/e2fsck/rehash.c:985:11: enter_function: entry to ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1007:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1011:24: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1012:18: call_function: calling ‘ext2fs_get_array’ from ‘e2fsck_rehash_dir’
e2fsprogs-1.47.3/e2fsck/rehash.c:1012:18: return_function: returning to ‘e2fsck_rehash_dir’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/e2fsck/rehash.c:1014:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/rehash.c:1017:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/e2fsck/rehash.c:1034:18: danger: ‘fd.harray’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
# 1032|   retry_nohash:
# 1033|   	/* Read in the entire directory into memory */
# 1034|-> 	retval = ext2fs_block_iterate3(fs, ino, 0, 0,
# 1035|   				       fill_dir_block, &fd);
# 1036|   	if (fd.err) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def245]
e2fsprogs-1.47.3/e2fsck/rehash.c:1170:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘iter’
e2fsprogs-1.47.3/e2fsck/rehash.c:1150:12: branch_true: following ‘true’ branch (when ‘all_dirs != 0’)...
e2fsprogs-1.47.3/e2fsck/rehash.c:1151:32: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1164:20: branch_false: following ‘false’ branch (when ‘all_dirs == 0’)...
e2fsprogs-1.47.3/e2fsck/rehash.c:1170:30: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/rehash.c:1170:30: danger: use of uninitialized value ‘iter’ here
# 1168|   			ino = dir->ino;
# 1169|   		} else {
# 1170|-> 			if (!ext2fs_u32_list_iterate(iter, &ino))
# 1171|   				break;
# 1172|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def246]
e2fsprogs-1.47.3/e2fsck/unix.c:82: error[ctunullpointer]: Null pointer dereference: ctx
#   80|   		"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
#   81|   		"\t\t[-E extended-options] [-z undo_file] device\n"),
#   82|-> 		ctx->program_name ? ctx->program_name : "e2fsck");
#   83|   
#   84|   	fprintf(stderr, "%s", _("\nEmergency help:\n"

Error: CPPCHECK_WARNING (CWE-476): [#def247]
e2fsprogs-1.47.3/e2fsck/unix.c:82: warning[nullPointer]: Possible null pointer dereference: ctx
#   80|   		"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
#   81|   		"\t\t[-E extended-options] [-z undo_file] device\n"),
#   82|-> 		ctx->program_name ? ctx->program_name : "e2fsck");
#   83|   
#   84|   	fprintf(stderr, "%s", _("\nEmergency help:\n"

Error: GCC_ANALYZER_WARNING (CWE-476): [#def248]
e2fsprogs-1.47.3/e2fsck/unix.c:82:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ctx’
e2fsprogs-1.47.3/e2fsck/unix.c:816:18: enter_function: entry to ‘PRS’
e2fsprogs-1.47.3/e2fsck/unix.c:837:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:840:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:860:17: call_function: calling ‘usage’ from ‘PRS’
#   80|   		"\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
#   81|   		"\t\t[-E extended-options] [-z undo_file] device\n"),
#   82|-> 		ctx->program_name ? ctx->program_name : "e2fsck");
#   83|   
#   84|   	fprintf(stderr, "%s", _("\nEmergency help:\n"

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
e2fsprogs-1.47.3/e2fsck/unix.c:315:28: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/acpi/ac_adapter")’
e2fsprogs-1.47.3/e2fsck/unix.c:307:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:313:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:313:13: acquire_memory: allocated here
e2fsprogs-1.47.3/e2fsck/unix.c:314:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:314:12: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:315:28: throw: if ‘readdir’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:315:28: danger: ‘opendir("/proc/acpi/ac_adapter")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  313|   	d = opendir("/proc/acpi/ac_adapter");
#  314|   	if (d) {
#  315|-> 		while ((de=readdir(d)) != NULL) {
#  316|   			if (!strncmp(".", de->d_name, 1))
#  317|   				continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def250]
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
e2fsprogs-1.47.3/e2fsck/unix.c:625:16: branch_true: following ‘true’ branch (when ‘fd <= 2’)...
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: acquire_resource: opened here
e2fsprogs-1.47.3/e2fsck/unix.c:627:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:627:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:625:16: branch_true: following ‘true’ branch (when ‘fd <= 2’)...
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  624|   
#  625|   	while (fd <= 2) {
#  626|-> 		fd = open("/dev/null", O_RDWR);
#  627|   		if (fd < 0) {
#  628|   			fprintf(stderr, _("ERROR: Couldn't open "

Error: GCC_ANALYZER_WARNING (CWE-775): [#def251]
e2fsprogs-1.47.3/e2fsck/unix.c:634:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/e2fsck/unix.c:625:16: branch_true: following ‘true’ branch (when ‘fd <= 2’)...
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:626:22: acquire_resource: opened here
e2fsprogs-1.47.3/e2fsck/unix.c:627:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:627:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:634:16: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:634:16: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  632|   		}
#  633|   	}
#  634|-> 	(void) close(fd);
#  635|   }
#  636|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
e2fsprogs-1.47.3/e2fsck/unix.c:888:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/e2fsck/unix.c:837:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:840:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:857:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:864:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:865:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:869:28: branch_false: following ‘false’ branch (when ‘res == 1’)...
e2fsprogs-1.47.3/e2fsck/unix.c:872:32: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:876:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:879:30: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:879:30: acquire_resource: opened here
e2fsprogs-1.47.3/e2fsck/unix.c:880:28: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
e2fsprogs-1.47.3/e2fsck/unix.c:888:33: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:888:33: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:888:33: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  886|   			_("Invalid completion information file descriptor"));
#  887|   			} else
#  888|-> 				close(fd);
#  889|   			break;
#  890|   		case 'D':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
e2fsprogs-1.47.3/e2fsck/unix.c:1369:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/e2fsck/unix.c:1348:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:1356:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1358:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1359:20: acquire_memory: allocated here
e2fsprogs-1.47.3/e2fsck/unix.c:1360:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1364:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1367:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:1369:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:1369:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 1367|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
# 1368|   		retval = errno;
# 1369|-> 		com_err(ctx->program_name, retval,
# 1370|   			_("while trying to delete %s"), tdb_file);
# 1371|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
e2fsprogs-1.47.3/e2fsck/unix.c:1374:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/e2fsck/unix.c:1348:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:1356:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1358:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1359:20: acquire_memory: allocated here
e2fsprogs-1.47.3/e2fsck/unix.c:1360:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1364:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1374:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:1374:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 1372|   	}
# 1373|   
# 1374|-> 	retval = set_undo_io_backing_manager(*io_ptr);
# 1375|   	if (retval)
# 1376|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
e2fsprogs-1.47.3/e2fsck/unix.c:1378:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/e2fsck/unix.c:1348:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:1356:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1358:20: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1359:20: acquire_memory: allocated here
e2fsprogs-1.47.3/e2fsck/unix.c:1360:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/unix.c:1364:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1375:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/unix.c:1377:9: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/unix.c:1378:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/e2fsck/unix.c:1378:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
# 1376|   		goto errout;
# 1377|   	*io_ptr = undo_io_manager;
# 1378|-> 	retval = set_undo_io_backup_file(tdb_file);
# 1379|   	if (retval)
# 1380|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
e2fsprogs-1.47.3/e2fsck/util.c:595:27: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(1024)’
e2fsprogs-1.47.3/e2fsck/util.c:557:9: enter_function: entry to ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:579:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:582:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:582:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:585:13: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:589:16: branch_true: following ‘true’ branch (when ‘blocksize <= 65536’)...
e2fsprogs-1.47.3/e2fsck/util.c:590:29: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:592:34: branch_true: following ‘true’ branch (when ‘bpg == 0’)...
e2fsprogs-1.47.3/e2fsck/util.c:592:23: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:595:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:596:33: throw: if ‘ext2fs_blocks_count’ throws an exception...
e2fsprogs-1.47.3/e2fsck/util.c:595:27: danger: ‘malloc(1024)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  593|   		blk64_t	num_blocks;
#  594|   
#  595|-> 		if (fs && fs->super) {
#  596|   			limit = ext2fs_blocks_count(fs->super) / this_bpg;
#  597|   		} else if (ctx && ext2fs_get_device_size2(ctx->filesystem_name,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
e2fsprogs-1.47.3/e2fsck/util.c:597:35: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(1024)’
e2fsprogs-1.47.3/e2fsck/util.c:557:9: enter_function: entry to ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:579:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:582:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:582:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:585:13: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:589:16: branch_true: following ‘true’ branch (when ‘blocksize <= 65536’)...
e2fsprogs-1.47.3/e2fsck/util.c:590:29: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:597:27: branch_true: following ‘true’ branch (when ‘ctx’ is non-NULL)...
e2fsprogs-1.47.3/e2fsck/util.c:597:35: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:597:35: throw: if ‘ext2fs_get_device_size2’ throws an exception...
e2fsprogs-1.47.3/e2fsck/util.c:597:35: danger: ‘malloc(1024)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  595|   		if (fs && fs->super) {
#  596|   			limit = ext2fs_blocks_count(fs->super) / this_bpg;
#  597|-> 		} else if (ctx && ext2fs_get_device_size2(ctx->filesystem_name,
#  598|   							  blocksize,
#  599|   							  &num_blocks) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
e2fsprogs-1.47.3/e2fsck/util.c:609:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(1024)’
e2fsprogs-1.47.3/e2fsck/util.c:557:9: enter_function: entry to ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:579:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:582:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:582:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:585:13: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:589:16: branch_true: following ‘true’ branch (when ‘blocksize <= 65536’)...
e2fsprogs-1.47.3/e2fsck/util.c:590:29: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:609:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/e2fsck/util.c:609:17: danger: ‘malloc(1024)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  607|   		}
#  608|   
#  609|-> 		io_channel_set_blksize(io, blocksize);
#  610|   
#  611|   		while ((grp = ext2fs_list_backups(NULL, &three,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
e2fsprogs-1.47.3/e2fsck/util.c:641:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/util.c:557:9: enter_function: entry to ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:579:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:582:13: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:582:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:585:13: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_backup_sb’
e2fsprogs-1.47.3/e2fsck/util.c:640:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/e2fsck/util.c:641:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/util.c:641:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/e2fsck/util.c:641:17: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  639|   cleanup:
#  640|   	if (io)
#  641|-> 		io_channel_close(io);
#  642|   	if (buf)
#  643|   		ext2fs_free_mem(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
e2fsprogs-1.47.3/lib/e2p/iod.c:58:15: warning[-Wanalyzer-malloc-leak]: leak of ‘de’
e2fsprogs-1.47.3/lib/e2p/iod.c:53:14: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/e2p/iod.c:54:12: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
e2fsprogs-1.47.3/lib/e2p/iod.c:56:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:58:15: throw: if ‘opendir’ throws an exception...
e2fsprogs-1.47.3/lib/e2p/iod.c:58:15: danger: ‘de’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   56|   	memset(de, 0, max_len+1);
#   57|   
#   58|-> 	dir = opendir (dir_name);
#   59|   	if (dir == NULL) {
#   60|   		free(de);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: warning[-Wanalyzer-malloc-leak]: leak of ‘de’
e2fsprogs-1.47.3/lib/e2p/iod.c:53:14: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/e2p/iod.c:54:12: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
e2fsprogs-1.47.3/lib/e2p/iod.c:56:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: throw: if ‘readdir’ throws an exception...
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: danger: ‘de’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   61|   		return -1;
#   62|   	}
#   63|-> 	while ((dep = readdir (dir))) {
#   64|   #ifdef HAVE_RECLEN_DIRENT
#   65|   		len = dep->d_reclen;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir_name)’
e2fsprogs-1.47.3/lib/e2p/iod.c:54:12: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
e2fsprogs-1.47.3/lib/e2p/iod.c:56:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:58:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: throw: if ‘readdir’ throws an exception...
e2fsprogs-1.47.3/lib/e2p/iod.c:63:23: danger: ‘opendir(dir_name)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   61|   		return -1;
#   62|   	}
#   63|-> 	while ((dep = readdir (dir))) {
#   64|   #ifdef HAVE_RECLEN_DIRENT
#   65|   		len = dep->d_reclen;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
e2fsprogs-1.47.3/lib/e2p/iod.c:72:21: warning[-Wanalyzer-malloc-leak]: leak of ‘de’
e2fsprogs-1.47.3/lib/e2p/iod.c:53:14: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/e2p/iod.c:54:12: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
e2fsprogs-1.47.3/lib/e2p/iod.c:56:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/e2p/iod.c:59:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:63:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/e2p/iod.c:65:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/e2p/iod.c:72:21: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/e2p/iod.c:72:21: danger: ‘de’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   70|   #endif
#   71|   		memcpy(de, dep, len);
#   72|-> 		if ((*func)(dir_name, de, private))
#   73|   			ret++;
#   74|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def264]
e2fsprogs-1.47.3/lib/et/com_err.c:73:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
e2fsprogs-1.47.3/lib/et/com_err.c:76:6: enter_function: entry to ‘com_err’
e2fsprogs-1.47.3/lib/et/com_err.c:84:5: acquire_resource: ‘va_start’ called here
e2fsprogs-1.47.3/lib/et/com_err.c:85:5: call_function: inlined call to ‘com_err_va’ from ‘com_err’
#   71|   		 va_list args)
#   72|   {
#   73|->     (*com_err_hook) (whoami, code, fmt, args);
#   74|   }
#   75|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
e2fsprogs-1.47.3/lib/et/init_et.c:53:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_et’
e2fsprogs-1.47.3/lib/et/init_et.c:39:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/et/init_et.c:42:32: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/et/init_et.c:43:8: branch_false: following ‘false’ branch (when ‘new_et’ is non-NULL)...
e2fsprogs-1.47.3/lib/et/init_et.c:45:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/et/init_et.c:53:1: danger: ‘new_et’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   51|       _et_dynamic_list = &new_et->etl;
#   52|       return 0;
#   53|-> }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘rec.block_buf’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:57:11: enter_function: entry to ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:64:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:66:14: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:66:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:69:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:71:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:71:18: return_function: returning to ‘ext2fs_update_bb_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:73:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:75:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:76:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: throw: if ‘ext2fs_block_iterate2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: danger: ‘rec.block_buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
#   83|   	 * First clear the old bad blocks (while saving the indirect blocks)
#   84|   	 */
#   85|-> 	retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
#   86|   				       BLOCK_FLAG_DEPTH_TRAVERSE, 0,
#   87|   				       clear_bad_block_proc, &rec);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: warning[-Wanalyzer-malloc-leak]: leak of ‘rec.ind_blocks’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:57:11: enter_function: entry to ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:64:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:66:14: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:66:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:69:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:71:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:71:18: return_function: returning to ‘ext2fs_update_bb_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:73:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:75:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:76:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_update_bb_inode’
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: throw: if ‘ext2fs_block_iterate2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/bb_inode.c:85:18: danger: ‘rec.ind_blocks’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#   83|   	 * First clear the old bad blocks (while saving the indirect blocks)
#   84|   	 */
#   85|-> 	retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
#   86|   				       BLOCK_FLAG_DEPTH_TRAVERSE, 0,
#   87|   				       clear_bad_block_proc, &rec);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
e2fsprogs-1.47.3/lib/ext2fs/bitops.h:420:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/e2fsck/pass1.c:4148:13: enter_function: entry to ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4192:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:39: branch_false: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4199:24: call_function: inlined call to ‘ext2fs_get_mem’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4200:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/pass1.c:4206:9: call_function: inlined call to ‘ext2fs_mark_super_dirty’ from ‘new_table_block’
e2fsprogs-1.47.3/e2fsck/pass1.c:4212:21: branch_true: following ‘true’ branch (when ‘i < num’)...
e2fsprogs-1.47.3/e2fsck/pass1.c:4213:17: branch_true: ...to here
e2fsprogs-1.47.3/e2fsck/pass1.c:4214:17: call_function: inlined call to ‘ext2fs_mark_block_bitmap2’ from ‘new_table_block’
#  418|   				       blk64_t block)
#  419|   {
#  420|-> 	return ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap,
#  421|   					block);
#  422|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
e2fsprogs-1.47.3/lib/ext2fs/bitops.h:454:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cs.buf’
e2fsprogs-1.47.3/e2fsck/pass1b.c:914:18: enter_function: entry to ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:937:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘clone_file’
e2fsprogs-1.47.3/e2fsck/pass1b.c:941:13: call_function: inlined call to ‘ext2fs_test_inode_bitmap2’ from ‘clone_file’
#  452|   				       ext2_ino_t inode)
#  453|   {
#  454|-> 	return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
#  455|   					inode);
#  456|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
e2fsprogs-1.47.3/lib/ext2fs/bitops.h:454:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  452|   				       ext2_ino_t inode)
#  453|   {
#  454|-> 	return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
#  455|   					inode);
#  456|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
e2fsprogs-1.47.3/lib/ext2fs/bitops.h:454:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  452|   				       ext2_ino_t inode)
#  453|   {
#  454|-> 	return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap,
#  455|   					inode);
#  456|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
e2fsprogs-1.47.3/lib/ext2fs/bitops.h:549:14: warning[-Wanalyzer-malloc-leak]: leak of ‘list.extents’
e2fsprogs-1.47.3/e2fsck/extents.c:620:6: enter_function: entry to ‘e2fsck_pass1e’
e2fsprogs-1.47.3/e2fsck/extents.c:622:9: call_function: calling ‘rebuild_extents’ from ‘e2fsck_pass1e’
#  547|   	errcode_t rv;
#  548|   
#  549|-> 	rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap,
#  550|   						start, end, &o);
#  551|   	if (!rv)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:277:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(40)’
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:246:18: enter_function: entry to ‘rb_copy_bmap’
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:264:16: branch_true: following ‘true’ branch (when ‘src_node’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:266:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rb_copy_bmap’
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:271:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:277:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:278:52: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:278:37: throw: if ‘ext2fs_rb_last’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_rb.c:277:21: danger: ‘malloc(40)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  275|   
#  276|   		dest_last = NULL;
#  277|-> 		if (*n) {
#  278|   			dest_last = ext2fs_rb_last(&dest_bp->root);
#  279|   			n = &(dest_last)->rb_right;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def274]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:259:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  257|   
#  258|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  259|-> 	csum = gdp->bg_block_bitmap_csum_lo;
#  260|   	if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
#  261|   		csum |= ((__u32)gdp->bg_block_bitmap_csum_hi << 16);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def275]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:273:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  271|   
#  272|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  273|-> 	return gdp->bg_block_bitmap |
#  274|   		(ext2fs_has_feature_64bit(fs->super) ?
#  275|   		 (__u64)gdp->bg_block_bitmap_hi << 32 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def276]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:286:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  284|   
#  285|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  286|-> 	gdp->bg_block_bitmap = blk;
#  287|   	if (ext2fs_has_feature_64bit(fs->super))
#  288|   		gdp->bg_block_bitmap_hi = (__u64) blk >> 32;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def277]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:300:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  298|   
#  299|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  300|-> 	csum = gdp->bg_inode_bitmap_csum_lo;
#  301|   	if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
#  302|   		csum |= ((__u32)gdp->bg_inode_bitmap_csum_hi << 16);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def278]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:314:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  312|   
#  313|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  314|-> 	return gdp->bg_inode_bitmap |
#  315|   		(ext2fs_has_feature_64bit(fs->super) ?
#  316|   		 (__u64) gdp->bg_inode_bitmap_hi << 32 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def279]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:327:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  325|   
#  326|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  327|-> 	gdp->bg_inode_bitmap = blk;
#  328|   	if (ext2fs_has_feature_64bit(fs->super))
#  329|   		gdp->bg_inode_bitmap_hi = (__u64) blk >> 32;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def280]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:340:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  338|   
#  339|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  340|-> 	return gdp->bg_inode_table |
#  341|   		(ext2fs_has_feature_64bit(fs->super) ?
#  342|   		 (__u64) gdp->bg_inode_table_hi << 32 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def281]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:353:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  351|   
#  352|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  353|-> 	gdp->bg_inode_table = blk;
#  354|   	if (ext2fs_has_feature_64bit(fs->super))
#  355|   		gdp->bg_inode_table_hi = (__u64) blk >> 32;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def282]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:366:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  364|   
#  365|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  366|-> 	return gdp->bg_free_blocks_count |
#  367|   		(ext2fs_has_feature_64bit(fs->super) ?
#  368|   		 (__u32) gdp->bg_free_blocks_count_hi << 16 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def283]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:379:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  377|   
#  378|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  379|-> 	gdp->bg_free_blocks_count = n;
#  380|   
#  381|   	if (ext2fs_has_feature_64bit(fs->super))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def284]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:393:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  391|   
#  392|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  393|-> 	return gdp->bg_free_inodes_count |
#  394|   		(ext2fs_has_feature_64bit(fs->super) ?
#  395|   		 (__u32) gdp->bg_free_inodes_count_hi << 16 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def285]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:406:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  404|   
#  405|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  406|-> 	gdp->bg_free_inodes_count = n;
#  407|   	if (ext2fs_has_feature_64bit(fs->super))
#  408|   		gdp->bg_free_inodes_count_hi = (__u32) n >> 16;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def286]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:419:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  417|   
#  418|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  419|-> 	return gdp->bg_used_dirs_count |
#  420|   		(ext2fs_has_feature_64bit(fs->super) ?
#  421|   		 (__u32) gdp->bg_used_dirs_count_hi << 16 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def287]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:432:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  430|   
#  431|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  432|-> 	gdp->bg_used_dirs_count = n;
#  433|   	if (ext2fs_has_feature_64bit(fs->super))
#  434|   		gdp->bg_used_dirs_count_hi = (__u32) n >> 16;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def288]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:445:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  443|   
#  444|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  445|-> 	return gdp->bg_itable_unused |
#  446|   		(ext2fs_has_feature_64bit(fs->super) ?
#  447|   		 (__u32) gdp->bg_itable_unused_hi << 16 : 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def289]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:458:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  456|   
#  457|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  458|-> 	gdp->bg_itable_unused = n;
#  459|   	if (ext2fs_has_feature_64bit(fs->super))
#  460|   		gdp->bg_itable_unused_hi = (__u32) n >> 16;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def290]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:471:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  469|   
#  470|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  471|-> 	return gdp->bg_flags;
#  472|   }
#  473|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def291]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:482:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  480|   
#  481|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  482|-> 	gdp->bg_flags = 0;
#  483|   	return;
#  484|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def292]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:494:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  492|   
#  493|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  494|-> 	return gdp->bg_flags & bg_flag;
#  495|   }
#  496|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def293]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:505:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  503|   
#  504|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  505|-> 	gdp->bg_flags |= bg_flags;
#  506|   	return;
#  507|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def294]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:517:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  515|   
#  516|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  517|-> 	gdp->bg_flags &= ~bg_flags;
#  518|   	return;
#  519|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def295]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:529:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  527|   
#  528|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  529|-> 	return gdp->bg_checksum;
#  530|   }
#  531|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def296]
e2fsprogs-1.47.3/lib/ext2fs/blknum.c:540:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  538|   
#  539|   	gdp = ext4fs_group_desc(fs, fs->group_desc, group);
#  540|-> 	gdp->bg_checksum = checksum;
#  541|   	return;
#  542|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
e2fsprogs-1.47.3/lib/ext2fs/block.c:387:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ind_buf’
e2fsprogs-1.47.3/lib/ext2fs/block.c:321:11: enter_function: entry to ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:344:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:357:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:370:12: branch_false: following ‘false’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: return_function: returning to ‘ext2fs_block_iterate3’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/block.c:374:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:377:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:383:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:384:14: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:383:13: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:385:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:385:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:386:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:387:32: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/block.c:387:32: danger: ‘ctx.ind_buf’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  385|   		if (inode.osd1.hurd1.h_i_translator) {
#  386|   			blk64 = inode.osd1.hurd1.h_i_translator;
#  387|-> 			ret |= (*ctx.func)(fs, &blk64,
#  388|   					   BLOCK_COUNT_TRANSLATOR,
#  389|   					   0, 0, priv_data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
e2fsprogs-1.47.3/lib/ext2fs/block.c:406:31: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ind_buf’
e2fsprogs-1.47.3/lib/ext2fs/block.c:321:11: enter_function: entry to ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:344:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:357:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:370:12: branch_false: following ‘false’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: return_function: returning to ‘ext2fs_block_iterate3’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/block.c:374:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:377:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:397:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:406:31: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:406:31: throw: if ‘ext2fs_extent_open2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/block.c:406:31: danger: ‘ctx.ind_buf’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  404|   		unsigned int		j;
#  405|   
#  406|-> 		ctx.errcode = ext2fs_extent_open2(fs, ino, &inode, &handle);
#  407|   		if (ctx.errcode)
#  408|   			goto abort_exit;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
e2fsprogs-1.47.3/lib/ext2fs/block.c:526:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ind_buf’
e2fsprogs-1.47.3/lib/ext2fs/block.c:321:11: enter_function: entry to ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:344:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:351:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:357:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:370:12: branch_false: following ‘false’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_block_iterate3’
e2fsprogs-1.47.3/lib/ext2fs/block.c:373:26: return_function: returning to ‘ext2fs_block_iterate3’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/block.c:374:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:377:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:397:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:397:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:523:21: branch_true: following ‘true’ branch (when ‘i != 12’)...
e2fsprogs-1.47.3/lib/ext2fs/block.c:524:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:524:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/block.c:525:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/block.c:526:32: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/block.c:526:32: danger: ‘ctx.ind_buf’ leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  524|   		if (inode.i_block[i] || (flags & BLOCK_FLAG_APPEND)) {
#  525|   			blk64 = inode.i_block[i];
#  526|-> 			ret |= (*ctx.func)(fs, &blk64, ctx.bcount, 0, i, 
#  527|   					   priv_data);
#  528|   			inode.i_block[i] = (blk_t) blk64;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:354:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  352|   
#  353|   	if (inode->i_flags & EXT4_EXTENTS_FL) {
#  354|-> 		retval = ext2fs_extent_open2(fs, ino, inode, &handle);
#  355|   		if (retval)
#  356|   			goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:373:29: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  371|   		*phys_blk = inode_bmap(inode, block);
#  372|   		b = block ? inode_bmap(inode, block - 1) :
#  373|-> 			    ext2fs_find_inode_goal(fs, ino, inode, block);
#  374|   
#  375|   		if ((*phys_blk == 0) && (bmap_flags & BMAP_ALLOC)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:377:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  375|   		if ((*phys_blk == 0) && (bmap_flags & BMAP_ALLOC)) {
#  376|   			b64 = b;
#  377|-> 			retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
#  378|   						     &alloc_ctx);
#  379|   			b = b64;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:403:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  401|   			b = inode_bmap(inode, EXT2_IND_BLOCK-1);
#  402|   			b64 = b;
#  403|-> 			retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
#  404|   						     &alloc_ctx);
#  405|   			b = b64;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:431:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  429|   			b = inode_bmap(inode, EXT2_IND_BLOCK);
#  430|   			b64 = b;
#  431|-> 			retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
#  432|   						     &alloc_ctx);
#  433|   			b = b64;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:458:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:484:11: enter_function: entry to ‘ext2fs_bmap’
e2fsprogs-1.47.3/lib/ext2fs/bmap.c:491:15: call_function: calling ‘ext2fs_bmap2’ from ‘ext2fs_bmap’
#  456|   		b = inode_bmap(inode, EXT2_DIND_BLOCK);
#  457|   		b64 = b;
#  458|-> 		retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64,
#  459|   					     &alloc_ctx);
#  460|   		b = b64;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:56:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.buf’
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:26:11: enter_function: entry to ‘ext2fs_dblist_dir_iterate’
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:41:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:43:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:45:12: branch_false: following ‘false’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:48:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:48:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dblist_dir_iterate’
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:56:18: throw: if ‘ext2fs_dblist_iterate2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dblist_dir.c:56:18: danger: ‘ctx.buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   54|   	ctx.errcode = 0;
#   55|   
#   56|-> 	retval = ext2fs_dblist_iterate2(dblist, db_dir_proc, &ctx);
#   57|   
#   58|   	if (!block_buf)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:126:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.buf’
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:92:11: enter_function: entry to ‘ext2fs_dir_iterate2’
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:116:12: branch_false: following ‘false’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:119:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:119:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dir_iterate2’
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:126:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dir_iterate.c:126:18: danger: ‘ctx.buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  124|   	ctx.priv_data = priv_data;
#  125|   	ctx.errcode = 0;
#  126|-> 	retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_READ_ONLY, 0,
#  127|   				       ext2fs_process_dir_block, &ctx);
#  128|   	if (!block_buf)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def308]
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:44:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘in[1]’
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:278:11: enter_function: entry to ‘ext2fs_dirhash2’
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:305:16: call_function: calling ‘ext2fs_dirhash’ from ‘ext2fs_dirhash2’
#   42|   	__u32	sum = 0;
#   43|   	__u32	b0 = buf[0], b1 = buf[1];
#   44|-> 	__u32	a = in[0], b = in[1], c = in[2], d = in[3];
#   45|   	int	n = 16;
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def309]
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:83:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘in[1]’
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:278:11: enter_function: entry to ‘ext2fs_dirhash2’
e2fsprogs-1.47.3/lib/ext2fs/dirhash.c:305:16: call_function: calling ‘ext2fs_dirhash’ from ‘ext2fs_dirhash2’
#   81|   	/* Round 1 */
#   82|   	ROUND(F, a, b, c, d, in[0] + K1,  3);
#   83|-> 	ROUND(F, d, a, b, c, in[1] + K1,  7);
#   84|   	ROUND(F, c, d, a, b, in[2] + K1, 11);
#   85|   	ROUND(F, b, c, d, a, in[3] + K1, 19);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:47:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(368)’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:53:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:47:9: danger: ‘malloc(368)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   45|   	fs->mmp_fd = -1;
#   46|   
#   47|-> 	io_channel_bumpcount(fs->io);
#   48|   	if (fs->icache)
#   49|   		fs->icache->refcount++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:74:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:56:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:61:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: return_function: returning to ‘ext2fs_dup_handle’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:68:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:71:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:73:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:74:61: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:74:26: throw: if ‘ext2fs_copy_bitmap’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:74:26: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
#   72|   
#   73|   	if (src->inode_map) {
#   74|-> 		retval = ext2fs_copy_bitmap(src->inode_map, &fs->inode_map);
#   75|   		if (retval)
#   76|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:79:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:56:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:61:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: return_function: returning to ‘ext2fs_dup_handle’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:68:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:71:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:73:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:79:61: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:79:26: throw: if ‘ext2fs_copy_bitmap’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:79:26: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
#   77|   	}
#   78|   	if (src->block_map) {
#   79|-> 		retval = ext2fs_copy_bitmap(src->block_map, &fs->block_map);
#   80|   		if (retval)
#   81|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:84:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:56:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:61:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: return_function: returning to ‘ext2fs_dup_handle’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:68:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:71:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:73:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:83:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:83:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:84:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:84:26: throw: if ‘ext2fs_badblocks_copy’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:84:26: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
#   82|   	}
#   83|   	if (src->badblocks) {
#   84|-> 		retval = ext2fs_badblocks_copy(src->badblocks, &fs->badblocks);
#   85|   		if (retval)
#   86|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:89:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:56:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:61:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:66:18: return_function: returning to ‘ext2fs_dup_handle’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:68:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:71:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:73:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:83:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:83:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:88:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:88:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:89:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:89:26: throw: if ‘ext2fs_copy_dblist’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:89:26: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
#   87|   	}
#   88|   	if (src->dblist) {
#   89|-> 		retval = ext2fs_copy_dblist(src->dblist, &fs->dblist);
#   90|   		if (retval)
#   91|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:23:11: enter_function: entry to ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:30:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:34:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:51:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:56:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_dup_handle’
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:58:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/dupfs.c:118:9: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
#  116|   	return 0;
#  117|   errout:
#  118|-> 	ext2fs_free(fs);
#  119|   	return retval;
#  120|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2025:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*db.tdb_fn’
e2fsprogs-1.47.3/e2fsck/dirinfo.c:46:13: enter_function: entry to ‘setup_tdb’
e2fsprogs-1.47.3/e2fsck/dirinfo.c:62:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/e2fsck/dirinfo.c:66:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘setup_tdb’
# 2023|   	if (!pp)
# 2024|   		return EXT2_ET_NO_MEMORY;
# 2025|-> 	memcpy(ptr, &pp, sizeof (pp));
# 2026|   	return 0;
# 2027|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2037:9: warning[-Wanalyzer-malloc-leak]: leak of ‘getdqbuf()’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:594:12: enter_function: entry to ‘report_tree’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:600:23: call_function: calling ‘getdqbuf’ from ‘report_tree’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:600:23: return_function: returning to ‘report_tree’ from ‘getdqbuf’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:603:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:606:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:606:9: call_function: calling ‘read_blk’ from ‘report_tree’
# 2035|   		return EXT2_ET_NO_MEMORY;
# 2036|   	memset(pp, 0, size);
# 2037|-> 	memcpy(ptr, &pp, sizeof(pp));
# 2038|   	return 0;
# 2039|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def318]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2065:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:98:11: enter_function: entry to ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:105:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:110:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:118:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:118:18: return_function: returning to ‘ext2fs_create_inode_cache’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:121:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:122:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:134:9: call_function: calling ‘ext2fs_free_inode_cache’ from ‘ext2fs_create_inode_cache’
# 2063|   	void *p;
# 2064|   
# 2065|-> 	memcpy(&p, ptr, sizeof(p));
# 2066|   	free(p);
# 2067|   	p = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def319]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2065:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((long unsigned int *)<unknown>)[1]’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:98:11: enter_function: entry to ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:105:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:110:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:118:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:118:18: return_function: returning to ‘ext2fs_create_inode_cache’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:121:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:121:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:124:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:126:42: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:125:26: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:125:41: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:125:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:128:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:134:9: call_function: calling ‘ext2fs_free_inode_cache’ from ‘ext2fs_create_inode_cache’
# 2063|   	void *p;
# 2064|   
# 2065|-> 	memcpy(&p, ptr, sizeof(p));
# 2066|   	free(p);
# 2067|   	p = 0;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def320]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2068:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
e2fsprogs-1.47.3/lib/ext2fs/link.c:557:18: enter_function: entry to ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:567:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:571:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:574:18: call_function: calling ‘dx_lookup’ from ‘dx_link’
# 2066|   	free(p);
# 2067|   	p = 0;
# 2068|-> 	memcpy(ptr, &p, sizeof(p));
# 2069|   	return 0;
# 2070|   }

Error: CPPCHECK_WARNING (CWE-401): [#def321]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2083: error[memleakOnRealloc]: Common realloc mistake: 'p' nulled but not freed upon failure
# 2081|   	 * with C99 strict type aliasing rules. */
# 2082|   	memcpy(&p, ptr, sizeof(p));
# 2083|-> 	p = realloc(p, size);
# 2084|   	if (!p)
# 2085|   		return EXT2_ET_NO_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
e2fsprogs-1.47.3/lib/ext2fs/ext2fs.h:2086:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_ba.c:124:18: enter_function: entry to ‘ba_resize_bmap’
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_ba.c:143:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_ba.c:148:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_ba.c:151:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/blkmap64_ba.c:152:26: call_function: inlined call to ‘ext2fs_resize_mem’ from ‘ba_resize_bmap’
# 2084|   	if (!p)
# 2085|   		return EXT2_ET_NO_MEMORY;
# 2086|-> 	memcpy(ptr, &p, sizeof(p));
# 2087|   	return 0;
# 2088|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:33:18: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1729:11: enter_function: entry to ‘ext2fs_xattr_remove_all’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1744:16: call_function: calling ‘ext2fs_xattrs_write’ from ‘ext2fs_xattr_remove_all’
#   31|   	errcode_t retval;
#   32|   
#   33|-> 	retval = ext2fs_read_inode(fs, ino, &inode);
#   34|   	if (retval)
#   35|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def324]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:68:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1729:11: enter_function: entry to ‘ext2fs_xattr_remove_all’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1744:16: call_function: calling ‘ext2fs_xattrs_write’ from ‘ext2fs_xattr_remove_all’
#   66|   			hash = (hash << VALUE_HASH_SHIFT) ^
#   67|   			       (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^
#   68|-> 			       ext2fs_le32_to_cpu(*value++);
#   69|   		}
#   70|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:222:18: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:293:11: enter_function: entry to ‘ext2fs_adjust_ea_refcount3’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:305:12: branch_true: following ‘true’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:306:41: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:306:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_adjust_ea_refcount3’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:312:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:312:18: call_function: calling ‘ext2fs_read_ext_attr3’ from ‘ext2fs_adjust_ea_refcount3’
#  220|   	errcode_t	retval;
#  221|   
#  222|-> 	retval = io_channel_read_blk64(fs->io, block, 1, buf);
#  223|   	if (retval)
#  224|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:222:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:293:11: enter_function: entry to ‘ext2fs_adjust_ea_refcount3’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:305:12: branch_true: following ‘true’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:306:41: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:306:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_adjust_ea_refcount3’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:312:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:312:18: call_function: calling ‘ext2fs_read_ext_attr3’ from ‘ext2fs_adjust_ea_refcount3’
#  220|   	errcode_t	retval;
#  221|   
#  222|-> 	retval = io_channel_read_blk64(fs->io, block, 1, buf);
#  223|   	if (retval)
#  224|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:222:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1729:11: enter_function: entry to ‘ext2fs_xattr_remove_all’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1735:33: branch_true: following ‘true’ branch (when ‘x < end’)...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1736:17: call_function: inlined call to ‘ext2fs_free_mem’ from ‘ext2fs_xattr_remove_all’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1738:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1739:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1739:25: call_function: calling ‘xattr_inode_dec_ref’ from ‘ext2fs_xattr_remove_all’
#  220|   	errcode_t	retval;
#  221|   
#  222|-> 	retval = io_channel_read_blk64(fs->io, block, 1, buf);
#  223|   	if (retval)
#  224|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:765:15: warning[-Wanalyzer-malloc-leak]: leak of ‘inode’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1729:11: enter_function: entry to ‘ext2fs_xattr_remove_all’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1734:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1744:16: call_function: calling ‘ext2fs_xattrs_write’ from ‘ext2fs_xattr_remove_all’
#  763|   		return err;
#  764|   
#  765|-> 	err = ext2fs_read_inode_full(fs, handle->ino, EXT2_INODE(inode),
#  766|   				     inode_size);
#  767|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1105:23: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*handle_1(D)->fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1047:11: enter_function: entry to ‘ext2fs_xattrs_read_inode’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1094:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1095:28: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1095:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1095:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1101:38: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1101:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_xattrs_read_inode’
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1105:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ext_attr.c:1105:23: call_function: calling ‘ext2fs_read_ext_attr3’ from ‘ext2fs_xattrs_read_inode’
# 1103|   			goto out;
# 1104|   
# 1105|-> 		err = ext2fs_read_ext_attr3(handle->fs, blk, block_buf,
# 1106|   					    handle->ino);
# 1107|   		if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:597:26: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
#  595|   
#  596|   	if (handle->level == 0) {
#  597|-> 		retval = ext2fs_write_inode(handle->fs, handle->ino,
#  598|   					    handle->inode);
#  599|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:607:26: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
#  605|   		eh = (struct ext3_extent_header *)
#  606|   				handle->path[handle->level].buf;
#  607|-> 		retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino,
#  608|   						      eh);
#  609|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1045:28: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1043|   
# 1044|   	if (!goal_blk)
# 1045|-> 		goal_blk = ext2fs_find_inode_goal(handle->fs, handle->ino,
# 1046|   						  handle->inode, 0);
# 1047|   	retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1045:28: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1043|   
# 1044|   	if (!goal_blk)
# 1045|-> 		goal_blk = ext2fs_find_inode_goal(handle->fs, handle->ino,
# 1046|   						  handle->inode, 0);
# 1047|   	retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1047:18: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1045|   		goal_blk = ext2fs_find_inode_goal(handle->fs, handle->ino,
# 1046|   						  handle->inode, 0);
# 1047|-> 	retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,
# 1048|   				    &new_node_pblk);
# 1049|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1047:18: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1045|   		goal_blk = ext2fs_find_inode_goal(handle->fs, handle->ino,
# 1046|   						  handle->inode, 0);
# 1047|-> 	retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,
# 1048|   				    &new_node_pblk);
# 1049|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1075:18: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1073|   
# 1074|   	/* then update the checksum */
# 1075|-> 	retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino, neweh);
# 1076|   	if (retval)
# 1077|   		goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1080:18: warning[-Wanalyzer-malloc-leak]: leak of ‘newpath’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1168:11: enter_function: entry to ‘ext2fs_extent_insert’
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1181:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1189:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1191:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1192:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/extent.c:1199:34: call_function: calling ‘extent_node_split’ from ‘ext2fs_extent_insert’
# 1078|   
# 1079|   	/* ...and write the new node block out to disk. */
# 1080|-> 	retval = io_channel_write_blk64(handle->fs->io, new_node_pblk, 1,
# 1081|   					block_buf);
# 1082|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def338]
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:331:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:673:18: enter_function: entry to ‘extent_fallocate’
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:686:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:686:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:700:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:711:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:711:19: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:715:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:716:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:718:24: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fallocate.c:719:23: call_function: calling ‘ext_falloc_helper’ from ‘extent_fallocate’
#  329|   		}
#  330|   
#  331|-> 		return 0;
#  332|   	}
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:450:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_block’
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:401:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:402:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:404:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:408:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:408:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:408:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:417:16: branch_true: following ‘true’ branch (when ‘nbytes != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:418:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:419:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:422:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:432:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:435:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:442:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:443:39: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:444:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:445:45: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:445:45: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:446:36: branch_false: following ‘false’ branch (when ‘new_block’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:451:64: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:450:33: throw: if ‘ext2fs_sha512’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:450:33: danger: ‘new_block’ leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  448|   					goto fail;
#  449|   				}
#  450|-> 				ext2fs_sha512((const unsigned char*)file->buf,
#  451|   						fs->blocksize, new_block->sha);
#  452|   				old_block = ext2fs_hashmap_lookup(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:606:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:575:18: enter_function: entry to ‘ext2fs_file_zero_past_offset’
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:585:12: branch_false: following ‘false’ branch (when ‘off != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:588:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:589:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:594:40: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:595:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:597:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:597:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:601:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_file_zero_past_offset’
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:606:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:606:18: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/fileio.c:606:18: danger: ‘malloc((long unsigned int)*fs.blocksize)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  604|   
#  605|   	/* Read/zero/write block */
#  606|-> 	retval = io_channel_read_blk64(fs->io, blk, 1, b);
#  607|   	if (retval)
#  608|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:94:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirname)’
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:131:7: enter_function: entry to ‘ext2fs_find_block_device’
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:141:9: call_function: calling ‘add_to_dirlist’ from ‘ext2fs_find_block_device’
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:141:9: return_function: returning to ‘ext2fs_find_block_device’ from ‘add_to_dirlist’
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:145:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:147:24: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/finddev.c:151:17: call_function: calling ‘scan_dir’ from ‘ext2fs_find_block_device’
#   92|   	if ((dir = opendir(dirname)) == NULL)
#   93|   		return errno;
#   94|-> 	dp = readdir(dir);
#   95|   	while (dp) {
#   96|   		if (dirlen + strlen(dp->d_name) + 2 >= sizeof(path))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:87:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:154:11: enter_function: entry to ‘ext2fs_get_pathname’
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:160:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:162:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:162:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_get_pathname’
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:165:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/get_pathname.c:167:18: call_function: calling ‘ext2fs_get_pathname_int’ from ‘ext2fs_get_pathname’
#   85|   	}
#   86|   
#   87|-> 	if (!dir || (maxdepth < 0)) {
#   88|   		retval = ext2fs_get_mem(4, name);
#   89|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def343]
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:288:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘blocks’
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:279:11: enter_function: entry to ‘ext2fs_get_device_size’
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:285:18: call_function: calling ‘ext2fs_get_device_size2’ from ‘ext2fs_get_device_size’
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:285:18: return_function: returning to ‘ext2fs_get_device_size’ from ‘ext2fs_get_device_size2’
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:286:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:288:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/getsize.c:288:13: danger: use of uninitialized value ‘blocks’ here
#  286|   	if (retval)
#  287|   		return retval;
#  288|-> 	if (blocks >= (1ULL << 32))
#  289|   		return EFBIG;
#  290|   	*retblocks = (blk_t) blocks;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:72:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:76:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   75|   
#   76|   	for (group = 0; group < fs->group_desc_count; group++) {
#   77|-> 		blk = ext2fs_inode_table_loc(fs, group);
#   78|   		if (!blk) {
#   79|   			retval = EXT2_ET_MISSING_INODE_TABLE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:84:40: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:72:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:76:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:78:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:82:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:83:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:84:22: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:84:40: throw: if ‘ext2fs_blocks_count’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:84:40: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   82|   		left = fs->inode_blocks_per_group;
#   83|   		if ((blk < fs->super->s_first_data_block) ||
#   84|-> 		    (blk + left - 1 >= ext2fs_blocks_count(fs->super))) {
#   85|   			retval = EXT2_ET_GDESC_BAD_INODE_TABLE;
#   86|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:92:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:72:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:73:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:76:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:77:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:78:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:82:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:83:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:84:22: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:83:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:83:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:92:34: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:92:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   90|   			if (c > left)
#   91|   				c = left;
#   92|-> 			retval = io_channel_read_blk64(fs->io, blk, c, buf);
#   93|   			if (retval)
#   94|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:164:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:159:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:163:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:164:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:164:23: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:164:23: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  162|   
#  163|   	for (group = 0; group < fs->group_desc_count; group++) {
#  164|-> 		blk = ext2fs_inode_table_loc(fs, group);
#  165|   		if (!blk) {
#  166|   			retval = EXT2_ET_MISSING_INODE_TABLE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:183:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:159:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:163:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:164:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:165:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:169:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:175:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:179:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:179:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:183:34: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:183:34: throw: if ‘io_channel_write_blk64’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:183:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  181|   				goto errout;
#  182|   			}
#  183|-> 			retval = io_channel_write_blk64(fs->io, blk, c, buf);
#  184|   			if (retval)
#  185|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:191:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:159:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:160:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:191:18: throw: if ‘ext2fs_flush_icache’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:191:18: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  189|   		}
#  190|   	}
#  191|-> 	retval = ext2fs_flush_icache(fs);
#  192|   
#  193|   errout:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:235:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:213:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:216:22: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:216:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:217:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:223:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:235:18: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:235:18: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  233|   	memcpy(buf, fs->super, SUPERBLOCK_SIZE);
#  234|   #endif
#  235|-> 	actual = write(fd, buf, fs->blocksize);
#  236|   	if (actual == -1) {
#  237|   		retval = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
e2fsprogs-1.47.3/lib/ext2fs/imager.c:264:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/imager.c:213:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:216:22: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:216:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:217:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:223:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:236:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:240:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:240:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:249:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/imager.c:264:18: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/imager.c:264:18: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  262|   #endif
#  263|   
#  264|-> 	actual = write(fd, cp, (ssize_t)fs->blocksize * fs->desc_blocks);
#  265|   
#  266|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:121:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(368)’
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:88:11: enter_function: entry to ‘ext2fs_initialize’
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:112:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:119:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:128:20: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/initialize.c:121:21: danger: ‘malloc(368)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  119|   	memset(fs, 0, sizeof(struct struct_ext2_filsys));
#  120|   	fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
#  121|-> 	fs->flags = flags | EXT2_FLAG_RW;
#  122|   	fs->umask = 022;
#  123|   	fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:259:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(inline_size)’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:430:11: enter_function: entry to ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:438:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:440:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:447:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: call_function: calling ‘ext2fs_inline_data_ea_get’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: return_function: returning to ‘ext2fs_inline_data_expand’ from ‘ext2fs_inline_data_ea_get’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:450:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:452:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:453:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:457:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:458:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:463:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:472:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:474:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:474:18: call_function: calling ‘ext2fs_inline_data_ea_remove’ from ‘ext2fs_inline_data_expand’
#  257|   	errcode_t retval;
#  258|   
#  259|-> 	retval = ext2fs_xattrs_open(fs, ino, &handle);
#  260|   	if (retval)
#  261|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:263:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(inline_size)’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:430:11: enter_function: entry to ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:438:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:440:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:447:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: call_function: calling ‘ext2fs_inline_data_ea_get’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: return_function: returning to ‘ext2fs_inline_data_expand’ from ‘ext2fs_inline_data_ea_get’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:450:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:452:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:453:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:457:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:458:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:463:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:472:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:474:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:474:18: call_function: calling ‘ext2fs_inline_data_ea_remove’ from ‘ext2fs_inline_data_expand’
#  261|   		return retval;
#  262|   
#  263|-> 	retval = ext2fs_xattrs_read(handle);
#  264|   	if (retval)
#  265|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:325:26: warning[-Wanalyzer-malloc-leak]: leak of ‘blk_buf’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:346:1: enter_function: entry to ‘ext2fs_inline_data_dir_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:353:18: call_function: calling ‘ext2fs_get_memzero’ from ‘ext2fs_inline_data_dir_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:353:18: return_function: returning to ‘ext2fs_inline_data_dir_expand’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:354:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:365:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:365:18: call_function: calling ‘ext2fs_inline_data_convert_dir’ from ‘ext2fs_inline_data_dir_expand’
#  323|   	do {
#  324|   		dir2 = dir;
#  325|-> 		retval = ext2fs_get_rec_len(fs, dir, &rec_len);
#  326|   		if (retval)
#  327|   			goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:460:24: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(inline_size)’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:430:11: enter_function: entry to ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:438:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:440:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:447:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: call_function: calling ‘ext2fs_inline_data_ea_get’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: return_function: returning to ‘ext2fs_inline_data_expand’ from ‘ext2fs_inline_data_ea_get’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:450:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:452:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:453:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:457:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:458:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:460:24: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:471:18: throw: if ‘ext2fs_write_inode’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:460:24: danger: ‘malloc(inline_size)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/17)
#  458|   	if (data.ea_size > 0) {
#  459|   		memcpy(inline_buf + EXT4_MIN_INLINE_DATA_SIZE,
#  460|-> 		       data.ea_data, data.ea_size);
#  461|   	}
#  462|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:471:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(inline_size)’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:430:11: enter_function: entry to ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:438:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:440:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:444:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:447:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: call_function: calling ‘ext2fs_inline_data_ea_get’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:449:18: return_function: returning to ‘ext2fs_inline_data_expand’ from ‘ext2fs_inline_data_ea_get’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:450:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:452:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:453:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_inline_data_expand’
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:457:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:458:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:463:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:471:18: throw: if ‘ext2fs_write_inode’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/inline_data.c:471:18: danger: ‘malloc(inline_size)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/17)
#  469|   	 * pblk, which is bad news.
#  470|   	 */
#  471|-> 	retval = ext2fs_write_inode(fs, ino, &inode);
#  472|   	if (retval)
#  473|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
e2fsprogs-1.47.3/lib/ext2fs/inode.c:135:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*fs.icache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:98:11: enter_function: entry to ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:105:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:110:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:112:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:134:9: call_function: calling ‘ext2fs_free_inode_cache’ from ‘ext2fs_create_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:134:9: return_function: returning to ‘ext2fs_create_inode_cache’ from ‘ext2fs_free_inode_cache’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:135:9: danger: ‘*fs.icache’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  133|   errout:
#  134|   	ext2fs_free_inode_cache(fs->icache);
#  135|-> 	fs->icache = 0;
#  136|   	return retval;
#  137|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
e2fsprogs-1.47.3/lib/ext2fs/inode.c:714:22: warning[-Wanalyzer-malloc-leak]: leak of ‘iptr’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:601:11: enter_function: entry to ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:612:18: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:613:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:643:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_true: following ‘true’ branch (when ‘length > bufsize’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:682:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:685:12: branch_false: following ‘false’ branch (when ‘extra_bytes == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:712:36: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:712:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:713:23: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:712:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:715:60: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:714:22: throw: if ‘ext2fs_inode_csum_verify’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:714:22: danger: ‘iptr’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  712|   		if (!(iblock_status[iblk] & IBLOCK_STATUS_CSUMS_OK) &&
#  713|   		    !(scan->fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) &&
#  714|-> 		    !ext2fs_inode_csum_verify(scan->fs, scan->current_inode + 1,
#  715|   				(struct ext2_inode_large *)scan->ptr))
#  716|   			retval = EXT2_ET_INODE_CSUM_INVALID;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def360]
e2fsprogs-1.47.3/lib/ext2fs/inode.c:740:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘iptr’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:601:11: enter_function: entry to ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:612:18: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:613:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:643:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_true: following ‘true’ branch (when ‘length > bufsize’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:682:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:685:12: branch_false: following ‘false’ branch (when ‘extra_bytes == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:712:36: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:739:12: branch_true: following ‘true’ branch (when ‘iptr != inode’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:740:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:740:17: danger: use of uninitialized value ‘iptr’ here
#  738|   	*ino = scan->current_inode;
#  739|   	if (iptr != (struct ext2_inode_large *)inode) {
#  740|-> 		memcpy(inode, iptr, bufsize);
#  741|   		ext2fs_free_mem(&iptr);
#  742|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
e2fsprogs-1.47.3/lib/ext2fs/inode.c:744:1: warning[-Wanalyzer-malloc-leak]: leak of ‘iptr’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:601:11: enter_function: entry to ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:612:18: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:613:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:643:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:645:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:657:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:675:12: branch_true: following ‘true’ branch (when ‘length > bufsize’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:676:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_get_next_inode_full’
e2fsprogs-1.47.3/lib/ext2fs/inode.c:682:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:685:12: branch_false: following ‘false’ branch (when ‘extra_bytes == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:712:36: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:739:12: branch_false: following ‘false’ branch (when ‘iptr == inode’)...
e2fsprogs-1.47.3/lib/ext2fs/inode.c:739:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode.c:744:1: danger: ‘iptr’ leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
#  742|   	}
#  743|   	return retval;
#  744|-> }
#  745|   
#  746|   errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:154:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:114:18: enter_function: entry to ‘inode_open’
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:121:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:124:14: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:124:46: branch_true: following ‘true’ branch (when ‘data’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:126:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:128:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:130:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:130:12: branch_false: following ‘false’ branch (when ‘prev’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:133:30: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:135:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘inode_open’
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:142:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘inode_open’
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:154:18: throw: if ‘ext2fs_file_open2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/inode_io.c:154:18: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  152|   
#  153|   	open_flags = (flags & IO_FLAG_RW) ? EXT2_FILE_WRITE : 0;
#  154|-> 	retval = ext2fs_file_open2(data->fs, data->ino,
#  155|   				   (data->flags & CHANNEL_HAS_INODE) ?
#  156|   				   &data->inode : 0, open_flags,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:51:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:28:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:30:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:30:12: branch_false: following ‘false’ branch (when ‘opts’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:33:14: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:33:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:36:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:36:19: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:37:12: branch_false: following ‘false’ branch (when ‘options’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:39:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:42:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:44:20: branch_true: following ‘true’ branch (when ‘next’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:45:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:48:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:49:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:51:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/io_manager.c:51:26: danger: ‘ptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   49|   			*arg++ = 0;
#   50|   
#   51|-> 		retval = (channel->manager->set_option)(channel, ptr, arg);
#   52|   		if (retval)
#   53|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def364]
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:396:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 128)’
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:375:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:386:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:386:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:387:44: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:386:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:388:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:388:34: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:390:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:396:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/ismounted.c:396:33: danger: ‘open(device, 128)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  394|   				 * to perform any more checks.
#  395|   				 */
#  396|-> 				close(fd);
#  397|   				*mount_flags = 0;
#  398|   				return 0;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def365]
e2fsprogs-1.47.3/lib/ext2fs/link.c:52:21: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
e2fsprogs-1.47.3/lib/ext2fs/link.c:557:18: enter_function: entry to ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:567:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:571:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:574:18: call_function: calling ‘dx_lookup’ from ‘dx_link’
#   50|   
#   51|   	for (level = 0; level < info->levels; level++) {
#   52|-> 		if (info->frames[level].buf == NULL)
#   53|   			break;
#   54|   		ext2fs_free_mem(&(info->frames[level].buf));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
e2fsprogs-1.47.3/lib/ext2fs/link.c:82:19: warning[-Wanalyzer-malloc-leak]: leak of ‘dx_info.frames[0].buf’
e2fsprogs-1.47.3/lib/ext2fs/link.c:557:18: enter_function: entry to ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:567:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:571:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:574:18: call_function: calling ‘dx_lookup’ from ‘dx_link’
#   80|   	int ret_flags;
#   81|   
#   82|-> 	errcode = ext2fs_bmap2(fs, dir, diri, NULL, 0, block, &ret_flags,
#   83|   			       pblk);
#   84|   	if (errcode)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
e2fsprogs-1.47.3/lib/ext2fs/link.c:572:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/link.c:557:18: enter_function: entry to ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:567:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘dx_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:571:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:574:18: call_function: calling ‘dx_lookup’ from ‘dx_link’
#  570|   
#  571|   	dx_info.name = name;
#  572|-> 	dx_info.namelen = strlen(name);
#  573|   again:
#  574|   	retval = dx_lookup(fs, dir, diri, &dx_info);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
e2fsprogs-1.47.3/lib/ext2fs/link.c:658:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.buf’
e2fsprogs-1.47.3/lib/ext2fs/link.c:609:11: enter_function: entry to ‘ext2fs_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:616:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:618:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:618:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:618:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:622:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:625:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:625:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:628:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:630:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/link.c:630:29: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:638:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:639:14: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:638:13: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:640:39: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:646:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/link.c:649:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/link.c:654:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_link’
e2fsprogs-1.47.3/lib/ext2fs/link.c:658:17: throw: if ‘ext2fs_process_dir_block’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/link.c:658:17: danger: ‘ctx.buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/18)
#  656|   			return retval;
#  657|   
#  658|-> 		ext2fs_process_dir_block(fs, &pblk, lblk, 0, 0, &ctx);
#  659|   		retval = ctx.errcode;
#  660|   		ext2fs_free_mem(&ctx.buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:116:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:493:11: enter_function: entry to ‘ext2fs_add_journal_inode3’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:505:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:512:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:535:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:543:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:545:31: call_function: calling ‘write_journal_file’ from ‘ext2fs_add_journal_inode3’
#  114|   
#  115|   	/* Open the device or journal file */
#  116|-> 	if ((fd = open(filename, O_WRONLY)) < 0) {
#  117|   		retval = errno;
#  118|   		goto errfree;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:123:20: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:493:11: enter_function: entry to ‘ext2fs_add_journal_inode3’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:505:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:512:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:535:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:543:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:545:31: call_function: calling ‘write_journal_file’ from ‘ext2fs_add_journal_inode3’
#  121|   	/* Write the superblock out */
#  122|   	retval = EXT2_ET_SHORT_WRITE;
#  123|-> 	ret_size = write(fd, buf, fs->blocksize);
#  124|   	if (ret_size < 0) {
#  125|   		retval = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def371]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:123:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 1)’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:493:11: enter_function: entry to ‘ext2fs_add_journal_inode3’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:505:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:512:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:535:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:543:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:545:31: call_function: calling ‘write_journal_file’ from ‘ext2fs_add_journal_inode3’
#  121|   	/* Write the superblock out */
#  122|   	retval = EXT2_ET_SHORT_WRITE;
#  123|-> 	ret_size = write(fd, buf, fs->blocksize);
#  124|   	if (ret_size < 0) {
#  125|   		retval = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:136:28: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:493:11: enter_function: entry to ‘ext2fs_add_journal_inode3’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:505:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:512:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:535:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:543:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:545:31: call_function: calling ‘write_journal_file’ from ‘ext2fs_add_journal_inode3’
#  134|   
#  135|   	for (i = 1; i < jparams->num_journal_blocks + jparams->num_fc_blocks; i++) {
#  136|-> 		ret_size = write(fd, buf, fs->blocksize);
#  137|   		if (ret_size < 0) {
#  138|   			retval = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:148:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:493:11: enter_function: entry to ‘ext2fs_add_journal_inode3’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:505:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:510:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:512:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:535:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:543:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:545:31: call_function: calling ‘write_journal_file’ from ‘ext2fs_add_journal_inode3’
#  146|   	retval = 0;
#  147|   errout:
#  148|-> 	close(fd);
#  149|   errfree:
#  150|   	ext2fs_free_mem(&buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: throw: if ‘ext2fs_read_bitmaps’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  291|   		return retval;
#  292|   
#  293|-> 	if ((retval = ext2fs_read_bitmaps(fs)))
#  294|   		goto out2;
#  295|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  294|   		goto out2;
#  295|   
#  296|-> 	if ((retval = ext2fs_read_inode(fs, journal_ino, &inode)))
#  297|   		goto out2;
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:320:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: following ‘false’ branch (when ‘goal != 18446744073709551615’)...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:307:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:320:18: throw: if ‘ext2fs_inode_size_set’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:320:18: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  318|   	inode.i_links_count = 1;
#  319|   	inode.i_mode = LINUX_S_IFREG | 0600;
#  320|-> 	retval = ext2fs_inode_size_set(fs, &inode, inode_size);
#  321|   	if (retval)
#  322|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:324:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: following ‘false’ branch (when ‘goal != 18446744073709551615’)...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:307:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:321:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:326:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:324:18: throw: if ‘ext2fs_fallocate’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:324:18: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  322|   		goto out2;
#  323|   
#  324|-> 	retval = ext2fs_fallocate(fs, falloc_flags, journal_ino,
#  325|   				  &inode, goal, 0,
#  326|   				  jparams->num_journal_blocks + jparams->num_fc_blocks);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: following ‘false’ branch (when ‘goal != 18446744073709551615’)...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:307:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:321:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:326:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: throw: if ‘ext2fs_write_new_inode’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  328|   		goto out2;
#  329|   
#  330|-> 	if ((retval = ext2fs_write_new_inode(fs, journal_ino, &inode)))
#  331|   		goto out2;
#  332|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:333:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: following ‘false’ branch (when ‘goal != 18446744073709551615’)...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:307:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:321:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:326:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:333:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:333:18: throw: if ‘ext2fs_bmap2’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:333:18: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  331|   		goto out2;
#  332|   
#  333|-> 	retval = ext2fs_bmap2(fs, journal_ino, &inode, NULL, 0, 0, NULL, &zblk);
#  334|   	if (retval)
#  335|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:337:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:277:18: enter_function: entry to ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: call_function: calling ‘ext2fs_create_journal_superblock2’ from ‘write_journal_inode’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:23: return_function: returning to ‘write_journal_inode’ from ‘ext2fs_create_journal_superblock2’
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:289:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:293:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:296:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:299:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:304:12: branch_false: following ‘false’ branch (when ‘goal != 18446744073709551615’)...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:307:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:321:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:326:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:327:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:330:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:333:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:334:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:337:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:337:18: throw: if ‘io_channel_write_blk64’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/mkjournal.c:337:18: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  335|   		goto out2;
#  336|   
#  337|-> 	retval = io_channel_write_blk64(fs->io, zblk, 1, buf);
#  338|   	if (retval)
#  339|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
e2fsprogs-1.47.3/lib/ext2fs/namei.c:44:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:210:11: enter_function: entry to ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:216:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: call_function: calling ‘follow_link’ from ‘ext2fs_follow_link’
#   42|   
#   43|   #endif
#   44|-> 	retval = ext2fs_read_inode (fs, inode, &ei);
#   45|   	if (retval) return retval;
#   46|   	if (!LINUX_S_ISLNK (ei.i_mode)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
e2fsprogs-1.47.3/lib/ext2fs/namei.c:46:14: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:210:11: enter_function: entry to ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:216:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: call_function: calling ‘follow_link’ from ‘ext2fs_follow_link’
#   44|   	retval = ext2fs_read_inode (fs, inode, &ei);
#   45|   	if (retval) return retval;
#   46|-> 	if (!LINUX_S_ISLNK (ei.i_mode)) {
#   47|   		*res_inode = inode;
#   48|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
e2fsprogs-1.47.3/lib/ext2fs/namei.c:60:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:210:11: enter_function: entry to ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:216:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: call_function: calling ‘follow_link’ from ‘ext2fs_follow_link’
#   58|   			return retval;
#   59|   
#   60|-> 		retval = ext2fs_inline_data_get(fs, inode,
#   61|   						&ei, buffer, NULL);
#   62|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
e2fsprogs-1.47.3/lib/ext2fs/namei.c:76:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:210:11: enter_function: entry to ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:216:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:218:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_follow_link’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:222:18: call_function: calling ‘follow_link’ from ‘ext2fs_follow_link’
#   74|   			return retval;
#   75|   
#   76|-> 		retval = io_channel_read_blk64(fs->io, blk, 1, buffer);
#   77|   		if (retval) {
#   78|   			ext2fs_free_mem(&buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
e2fsprogs-1.47.3/lib/ext2fs/namei.c:148:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:191:11: enter_function: entry to ‘ext2fs_namei_follow’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:197:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/namei.c:199:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:199:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_namei_follow’
e2fsprogs-1.47.3/lib/ext2fs/namei.c:203:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/namei.c:203:18: call_function: calling ‘open_namei’ from ‘ext2fs_namei_follow’
#  146|   	       root, base, pathlen, pathname, link_count);
#  147|   #endif
#  148|-> 	retval = dir_namei(fs, root, base, pathname, pathlen,
#  149|   			   link_count, buf, &base_name, &namelen, &dir);
#  150|   	if (retval) return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:48:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:29:11: enter_function: entry to ‘ext2fs_new_dir_block’
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:40:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:42:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:42:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_new_dir_block’
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:45:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:51:18: throw: if ‘ext2fs_set_rec_len’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/newdir.c:48:13: danger: ‘malloc((long unsigned int)*fs.blocksize)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   46|   	dir = (struct ext2_dir_entry *) buf;
#   47|   
#   48|-> 	if (ext2fs_has_feature_metadata_csum(fs->super))
#   49|   		csum_size = sizeof(struct ext2_dir_entry_tail);
#   50|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:149:19: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(368)’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:116:11: enter_function: entry to ‘ext2fs_open2’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:141:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_open2’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:145:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:152:20: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:149:19: danger: ‘malloc(368)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  147|   	fs->flags = flags;
#  148|   	/* don't overwrite sb backups unless flag is explicitly cleared */
#  149|-> 	fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
#  150|   	fs->umask = 022;
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:181:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:116:11: enter_function: entry to ‘ext2fs_open2’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:141:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_open2’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:145:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:153:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:157:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:158:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:162:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:162:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_open2’
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:167:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:173:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:181:18: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/openfs.c:181:18: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/9)
#  179|   	if (flags & EXT2_FLAG_THREADS)
#  180|   		io_flags |= IO_FLAG_THREADS;
#  181|-> 	retval = manager->open(fs->device_name, io_flags, &fs->io);
#  182|   	if (retval)
#  183|   		goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: warning[-Wanalyzer-malloc-leak]: leak of ‘oi.buf’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:122:11: enter_function: entry to ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:144:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:146:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:157:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:160:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:163:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: danger: ‘oi.buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  173|   	oi.zerobuf = zerobuf;
#  174|   	oi.err = 0;
#  175|-> 	err = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_APPEND,
#  176|   				    0, mkorphan_proc, &oi);
#  177|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: warning[-Wanalyzer-malloc-leak]: leak of ‘oi.zerobuf’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:122:11: enter_function: entry to ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:144:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:146:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:157:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:160:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_create_orphan_file’
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:163:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/orphan.c:175:15: danger: ‘oi.zerobuf’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  173|   	oi.zerobuf = zerobuf;
#  174|   	oi.err = 0;
#  175|-> 	err = ext2fs_block_iterate3(fs, ino, BLOCK_FLAG_APPEND,
#  176|   				    0, mkorphan_proc, &oi);
#  177|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
e2fsprogs-1.47.3/lib/ext2fs/punch.c:101:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/punch.c:105:18: enter_function: entry to ‘ext2fs_punch_ind’
e2fsprogs-1.47.3/lib/ext2fs/punch.c:118:12: branch_false: following ‘false’ branch (when ‘start <= 4294967295’)...
e2fsprogs-1.47.3/lib/ext2fs/punch.c:120:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/punch.c:125:12: branch_true: following ‘true’ branch (when ‘block_buf’ is NULL)...
e2fsprogs-1.47.3/lib/ext2fs/punch.c:126:46: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/punch.c:126:26: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_punch_ind’
e2fsprogs-1.47.3/lib/ext2fs/punch.c:126:26: return_function: returning to ‘ext2fs_punch_ind’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/punch.c:127:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/punch.c:129:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/punch.c:134:25: branch_true: following ‘true’ branch (when ‘level != 4’)...
e2fsprogs-1.47.3/lib/ext2fs/punch.c:139:20: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/punch.c:139:20: branch_true: following ‘true’ branch (when ‘start < max’)...
e2fsprogs-1.47.3/lib/ext2fs/punch.c:140:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/punch.c:140:34: call_function: calling ‘ind_punch’ from ‘ext2fs_punch_ind’
#   99|   	printf("Freed %d blocks\n", freed);
#  100|   #endif
#  101|-> 	return ext2fs_iblk_sub_blocks(fs, inode, freed);
#  102|   }
#  103|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(72)’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:55:24: enter_function: entry to ‘qcow2_read_header’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:62:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘qcow2_read_header’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:65:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:67:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:67:13: danger: ‘malloc(72)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   65|   	memset(buffer, 0, sizeof(struct ext2_qcow2_hdr));
#   66|   
#   67|-> 	if (ext2fs_llseek(fd, 0, SEEK_SET < 0)) {
#   68|   		ext2fs_free_mem(&buffer);
#   69|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
#   98|   		return ret;
#   99|   
#  100|-> 	if (ext2fs_llseek(fd, img->l1_offset, SEEK_SET) < 0) {
#  101|   		ext2fs_free_mem(&table);
#  102|   		return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
#   98|   		return ret;
#   99|   
#  100|-> 	if (ext2fs_llseek(fd, img->l1_offset, SEEK_SET) < 0) {
#  101|   		ext2fs_free_mem(&table);
#  102|   		return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:13: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:89:12: enter_function: entry to ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:96:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:96:15: return_function: returning to ‘qcow2_read_l1_table’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:97:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:31: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:100:13: danger: ‘table’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#   98|   		return ret;
#   99|   
#  100|-> 	if (ext2fs_llseek(fd, img->l1_offset, SEEK_SET) < 0) {
#  101|   		ext2fs_free_mem(&table);
#  102|   		return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:124:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
#  122|   	assert(*l2_table);
#  123|   
#  124|-> 	if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
#  125|   		return errno;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:124:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
#  122|   	assert(*l2_table);
#  123|   
#  124|-> 	if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
#  125|   		return errno;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:124:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
#  122|   	assert(*l2_table);
#  123|   
#  124|-> 	if (ext2fs_llseek(fd, offset, SEEK_SET) < 0)
#  125|   		return errno;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:143:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  141|   	assert(buf);
#  142|   
#  143|-> 	if (ext2fs_llseek(fdout, off_out, SEEK_SET) < 0)
#  144|   		return errno;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:143:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  141|   	assert(buf);
#  142|   
#  143|-> 	if (ext2fs_llseek(fdout, off_out, SEEK_SET) < 0)
#  144|   		return errno;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:143:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  141|   	assert(buf);
#  142|   
#  143|-> 	if (ext2fs_llseek(fdout, off_out, SEEK_SET) < 0)
#  144|   		return errno;
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  144|   		return errno;
#  145|   
#  146|-> 	if (ext2fs_llseek(fdin, off_in, SEEK_SET) < 0)
#  147|   		return errno;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  144|   		return errno;
#  145|   
#  146|-> 	if (ext2fs_llseek(fdin, off_in, SEEK_SET) < 0)
#  147|   		return errno;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  144|   		return errno;
#  145|   
#  146|-> 	if (ext2fs_llseek(fdin, off_in, SEEK_SET) < 0)
#  147|   		return errno;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:159:30: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  157|   		for (ptr = buf, c = c1; c > 0; ptr += c2, c -= c2) {
#  158|   			errno = 0;
#  159|-> 			c2 = write(fdout, ptr, c1);
#  160|   			if (c2 < 0 || ((c2 == 0) && errno))
#  161|   				return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:159:30: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  157|   		for (ptr = buf, c = c1; c > 0; ptr += c2, c -= c2) {
#  158|   			errno = 0;
#  159|-> 			c2 = write(fdout, ptr, c1);
#  160|   			if (c2 < 0 || ((c2 == 0) && errno))
#  161|   				return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:159:30: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: call_function: calling ‘qcow2_read_l2_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:241:23: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:242:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:246:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:247:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:250:28: branch_false: following ‘false’ branch (when ‘offset != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:253:54: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:256:31: call_function: calling ‘qcow2_copy_data’ from ‘qcow2_write_raw_image’
#  157|   		for (ptr = buf, c = c1; c > 0; ptr += c2, c -= c2) {
#  158|   			errno = 0;
#  159|-> 			c2 = write(fdout, ptr, c1);
#  160|   			if (c2 < 0 || ((c2 == 0) && errno))
#  161|   				return errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: danger: ‘copy_buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/18)
#  213|   		goto out;
#  214|   
#  215|-> 	if (ext2fs_llseek(raw_fd, 0, SEEK_SET) < 0) {
#  216|   		ret = errno;
#  217|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: danger: ‘l2_table’ leaks here; was allocated at [(12)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/11)
#  213|   		goto out;
#  214|   
#  215|-> 	if (ext2fs_llseek(raw_fd, 0, SEEK_SET) < 0) {
#  216|   		ret = errno;
#  217|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def410]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:178:29: release_memory: ‘l2_table’ is NULL
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:229:26: danger: dereference of NULL ‘l1_table + (long unsigned int)l1_index * 8’
#  227|   		__u64 off_out;
#  228|   
#  229|-> 		offset = ext2fs_be64_to_cpu(l1_table[l1_index]) &
#  230|   			 ~QCOW_OFLAG_COPIED;
#  231|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: danger: ‘copy_buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/18)
#  262|   
#  263|   	/* Resize the output image to the filesystem size */
#  264|-> 	if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) {
#  265|   		ret = errno;
#  266|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: danger: ‘l1_table’ leaks here; was allocated at [(30)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/29)
#  262|   
#  263|   	/* Resize the output image to the filesystem size */
#  264|-> 	if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) {
#  265|   		ret = errno;
#  266|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: throw: if ‘ext2fs_llseek’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:13: danger: ‘l2_table’ leaks here; was allocated at [(12)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/11)
#  262|   
#  263|   	/* Resize the output image to the filesystem size */
#  264|-> 	if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) {
#  265|   		ret = errno;
#  266|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: warning[-Wanalyzer-malloc-leak]: leak of ‘copy_buf’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:269:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: danger: ‘copy_buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/18)
#  268|   
#  269|   	((char *)copy_buf)[0] = 0;
#  270|-> 	size = write(raw_fd, copy_buf, 1);
#  271|   	if (size != 1) {
#  272|   		ret = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: warning[-Wanalyzer-malloc-leak]: leak of ‘l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:269:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: danger: ‘l1_table’ leaks here; was allocated at [(30)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/29)
#  268|   
#  269|   	((char *)copy_buf)[0] = 0;
#  270|-> 	size = write(raw_fd, copy_buf, 1);
#  271|   	if (size != 1) {
#  272|   		ret = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: warning[-Wanalyzer-malloc-leak]: leak of ‘l2_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:171:5: enter_function: entry to ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:183:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:186:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:191:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:193:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:202:43: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:207:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: call_function: calling ‘ext2fs_get_memzero’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:211:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:215:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: call_function: calling ‘qcow2_read_l1_table’ from ‘qcow2_write_raw_image’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:220:15: return_function: returning to ‘qcow2_write_raw_image’ from ‘qcow2_read_l1_table’
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:221:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:224:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:226:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:35: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:264:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:269:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/qcow2.c:270:16: danger: ‘l2_table’ leaks here; was allocated at [(12)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/11)
#  268|   
#  269|   	((char *)copy_buf)[0] = 0;
#  270|-> 	size = write(raw_fd, copy_buf, 1);
#  271|   	if (size != 1) {
#  272|   		ret = errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:102:18: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:102:18: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:102:18: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  100|   	gdt_buf = (__u32 *)((char *)dindir_buf + fs->blocksize);
#  101|   
#  102|-> 	retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
#  103|   	if (retval)
#  104|   		goto out_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:121:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:121:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:121:26: throw: if ‘ext2fs_read_ind_block’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:121:26: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  119|   		printf("reading GDT dindir %u\n", dindir_blk);
#  120|   #endif
#  121|-> 		retval = ext2fs_read_ind_block(fs, dindir_blk, dindir_buf);
#  122|   		if (retval)
#  123|   			goto out_inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:129:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:125:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:129:26: throw: if ‘ext2fs_alloc_block’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:129:26: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  127|   			fs->inode_blocks_per_group;
#  128|   
#  129|-> 		retval = ext2fs_alloc_block(fs, goal, 0, &dindir_blk);
#  130|   		if (retval)
#  131|   			goto out_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:135:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:125:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:130:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:132:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:135:17: throw: if ‘ext2fs_iblk_set’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:135:17: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  133|   		inode.i_links_count = 1;
#  134|   		inode.i_block[EXT2_DIND_BLOCK] = dindir_blk;
#  135|-> 		ext2fs_iblk_set(fs, &inode, 1);
#  136|   		memset(dindir_buf, 0, fs->blocksize);
#  137|   #ifdef RES_GDT_DEBUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:143:26: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:125:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:130:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:132:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:143:26: throw: if ‘ext2fs_inode_size_set’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:143:26: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  141|   		inode_size = apb*apb + apb + EXT2_NDIR_BLOCKS;
#  142|   		inode_size *= fs->blocksize;
#  143|-> 		retval = ext2fs_inode_size_set(fs, &inode, inode_size);
#  144|   		if (retval)
#  145|   			goto out_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:182:34: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:125:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:130:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:132:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:144:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:146:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:151:14: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:153:24: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:158:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:178:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:178:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:182:34: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:182:34: throw: if ‘ext2fs_read_ind_block’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:182:34: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  180|   			printf("reading primary GDT block %u\n", gdt_blk);
#  181|   #endif
#  182|-> 			retval = ext2fs_read_ind_block(fs, gdt_blk, gdt_buf);
#  183|   			if (retval)
#  184|   				goto out_dindir;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:228:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dindir_buf’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:82:11: enter_function: entry to ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:93:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:95:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: call_function: calling ‘ext2fs_get_array’ from ‘ext2fs_create_resize_inode’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:97:18: return_function: returning to ‘ext2fs_create_resize_inode’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:98:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:100:19: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:103:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:111:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:117:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:125:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:130:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:132:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:144:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:146:33: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:151:14: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:226:1: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:227:12: branch_true: following ‘true’ branch (when ‘dindir_dirty != 0’)...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:228:27: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:228:27: throw: if ‘ext2fs_write_ind_block’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/res_gdt.c:228:27: danger: ‘dindir_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  226|   out_dindir:
#  227|   	if (dindir_dirty) {
#  228|-> 		retval2 = ext2fs_write_ind_block(fs, dindir_blk, dindir_buf);
#  229|   		if (!retval)
#  230|   			retval = retval2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:249:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(strlen(*fs.device_name) + 80)’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:230:18: enter_function: entry to ‘read_bitmaps_range_prepare’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:245:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘read_bitmaps_range_prepare’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:249:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:249:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:250:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:250:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:251:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:251:25: throw: if ‘ext2fs_free_block_bitmap’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:249:13: danger: ‘malloc(strlen(*fs.device_name) + 80)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  247|   		return retval;
#  248|   
#  249|-> 	if (flags & EXT2FS_BITMAPS_BLOCK) {
#  250|   		if (fs->block_map)
#  251|   			ext2fs_free_block_bitmap(fs->block_map);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:251:25: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  249|   	if (flags & EXT2FS_BITMAPS_BLOCK) {
#  250|   		if (fs->block_map)
#  251|-> 			ext2fs_free_block_bitmap(fs->block_map);
#  252|   		strcpy(buf, "block bitmap for ");
#  253|   		strcat(buf, fs->device_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:251:25: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  249|   	if (flags & EXT2FS_BITMAPS_BLOCK) {
#  250|   		if (fs->block_map)
#  251|-> 			ext2fs_free_block_bitmap(fs->block_map);
#  252|   		strcpy(buf, "block bitmap for ");
#  253|   		strcat(buf, fs->device_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:254:26: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  252|   		strcpy(buf, "block bitmap for ");
#  253|   		strcat(buf, fs->device_name);
#  254|-> 		retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
#  255|   		if (retval)
#  256|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:254:26: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  252|   		strcpy(buf, "block bitmap for ");
#  253|   		strcat(buf, fs->device_name);
#  254|-> 		retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
#  255|   		if (retval)
#  256|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:261:25: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  259|   	if (flags & EXT2FS_BITMAPS_INODE) {
#  260|   		if (fs->inode_map)
#  261|-> 			ext2fs_free_inode_bitmap(fs->inode_map);
#  262|   		strcpy(buf, "inode bitmap for ");
#  263|   		strcat(buf, fs->device_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:261:25: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  259|   	if (flags & EXT2FS_BITMAPS_INODE) {
#  260|   		if (fs->inode_map)
#  261|-> 			ext2fs_free_inode_bitmap(fs->inode_map);
#  262|   		strcpy(buf, "inode bitmap for ");
#  263|   		strcat(buf, fs->device_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:264:26: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  262|   		strcpy(buf, "inode bitmap for ");
#  263|   		strcat(buf, fs->device_name);
#  264|-> 		retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
#  265|   		if (retval)
#  266|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:264:26: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  262|   		strcpy(buf, "inode bitmap for ");
#  263|   		strcat(buf, fs->device_name);
#  264|-> 		retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
#  265|   		if (retval)
#  266|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  271|   cleanup:
#  272|   	if (flags & EXT2FS_BITMAPS_BLOCK) {
#  273|-> 		ext2fs_free_block_bitmap(fs->block_map);
#  274|   		fs->block_map = 0;
#  275|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:645:11: enter_function: entry to ‘ext2fs_read_block_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:647:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_block_bitmap’
#  271|   cleanup:
#  272|   	if (flags & EXT2FS_BITMAPS_BLOCK) {
#  273|-> 		ext2fs_free_block_bitmap(fs->block_map);
#  274|   		fs->block_map = 0;
#  275|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:277:17: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_ids’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  275|   	}
#  276|   	if (flags & EXT2FS_BITMAPS_INODE) {
#  277|-> 		ext2fs_free_inode_bitmap(fs->inode_map);
#  278|   		fs->inode_map = 0;
#  279|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:277:17: warning[-Wanalyzer-malloc-leak]: leak of ‘thread_infos’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:640:11: enter_function: entry to ‘ext2fs_read_inode_bitmap’
e2fsprogs-1.47.3/lib/ext2fs/rw_bitmaps.c:642:16: call_function: calling ‘ext2fs_rw_bitmaps’ from ‘ext2fs_read_inode_bitmap’
#  275|   	}
#  276|   	if (flags & EXT2FS_BITMAPS_INODE) {
#  277|-> 		ext2fs_free_inode_bitmap(fs->inode_map);
#  278|   		fs->inode_map = 0;
#  279|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:81:20: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:47:11: enter_function: entry to ‘ext2fs_symlink’
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:59:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:65:38: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:66:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:74:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:74:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘ext2fs_symlink’
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:77:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:82:12: branch_true: following ‘true’ branch (when ‘target_len > 59’)...
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:83:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:83:26: throw: if ‘ext2fs_find_inode_goal’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/symlink.c:81:20: danger: ‘malloc((long unsigned int)*fs.blocksize)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   79|   
#   80|   	memset(&inode, 0, sizeof(struct ext2_inode));
#   81|-> 	fastlink = (target_len < sizeof(inode.i_block));
#   82|   	if (!fastlink) {
#   83|   		retval = ext2fs_new_block2(fs, ext2fs_find_inode_goal(fs, ino,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:365:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3892:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3998:13: call_function: calling ‘tdb_brlock’ from ‘ext2fs_tdb_open_ex’
#  363|   
#  364|   	do {
#  365|-> 		ret = fcntl(tdb->fd,lck_type,&fl);
#  366|   	} while (ret == -1 && errno == EINTR);
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:365:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: call_function: calling ‘tdb_brlock’ from ‘ext2fs_tdb_open_ex’
#  363|   
#  364|   	do {
#  365|-> 		ret = fcntl(tdb->fd,lck_type,&fl);
#  366|   	} while (ret == -1 && errno == EINTR);
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:375:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3892:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3998:13: call_function: calling ‘tdb_brlock’ from ‘ext2fs_tdb_open_ex’
#  373|   			/* Ensure error code is set for log fun to examine. */
#  374|   			tdb->ecode = TDB_ERR_LOCK;
#  375|-> 			TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d\n",
#  376|   				 tdb->fd, offset, rw_type, lck_type, (int)len));
#  377|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:375:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: call_function: calling ‘tdb_brlock’ from ‘ext2fs_tdb_open_ex’
#  373|   			/* Ensure error code is set for log fun to examine. */
#  374|   			tdb->ecode = TDB_ERR_LOCK;
#  375|-> 			TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d\n",
#  376|   				 tdb->fd, offset, rw_type, lck_type, (int)len));
#  377|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1001:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3930:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3936:12: branch_true: following ‘true’ branch (when ‘rev == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3937:28: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3964:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3968:9: call_function: calling ‘tdb_mmap’ from ‘ext2fs_tdb_open_ex’
#  999|   #ifdef HAVE_MMAP
# 1000|   	if (!(tdb->flags & TDB_NOMMAP)) {
# 1001|-> 		tdb->map_ptr = mmap(NULL, tdb->map_size,
# 1002|   				    PROT_READ|(tdb->read_only? 0:PROT_WRITE),
# 1003|   				    MAP_SHARED|MAP_FILE, tdb->fd, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1012:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3921:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3923:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3964:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3968:9: call_function: calling ‘tdb_mmap’ from ‘ext2fs_tdb_open_ex’
# 1010|   			tdb->real_map_size = 0;
# 1011|   			tdb->map_ptr = NULL;
# 1012|-> 			TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_mmap failed for size %d (%s)\n",
# 1013|   				 tdb->map_size, strerror(errno)));
# 1014|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1012:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3921:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3923:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3964:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3968:9: call_function: calling ‘tdb_mmap’ from ‘ext2fs_tdb_open_ex’
# 1010|   			tdb->real_map_size = 0;
# 1011|   			tdb->map_ptr = NULL;
# 1012|-> 			TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_mmap failed for size %d (%s)\n",
# 1013|   				 tdb->map_size, strerror(errno)));
# 1014|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1017:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3930:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3936:12: branch_true: following ‘true’ branch (when ‘rev == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3937:28: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3964:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3968:9: call_function: calling ‘tdb_mmap’ from ‘ext2fs_tdb_open_ex’
# 1015|   		tdb->real_map_size = tdb->map_size;
# 1016|   	} else {
# 1017|-> 		tdb->map_ptr = NULL;
# 1018|   	}
# 1019|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1164:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3475:5: enter_function: entry to ‘ext2fs_tdb_store’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3483:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3490:13: call_function: calling ‘tdb_lock’ from ‘ext2fs_tdb_store’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3490:13: return_function: returning to ‘ext2fs_tdb_store’ from ‘tdb_lock’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3490:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3494:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3494:12: branch_false: following ‘false’ branch (when ‘flag != 2’)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3501:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3501:21: call_function: calling ‘tdb_update_hash’ from ‘ext2fs_tdb_store’
# 1162|   		return TDB_ERRCODE(TDB_ERR_OOM, buf);
# 1163|   	}
# 1164|-> 	if (tdb->methods->tdb_read(tdb, offset, buf, len, 0) == -1) {
# 1165|   		SAFE_FREE(buf);
# 1166|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def447]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1425:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1562:12: enter_function: entry to ‘transaction_expand_file’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1562:12: call_function: calling ‘transaction_write’ from ‘transaction_expand_file’
# 1423|   	    off < FREELIST_TOP+TDB_HASHTABLE_SIZE(tdb)) {
# 1424|   		u32 chain = (off-FREELIST_TOP) / sizeof(tdb_off_t);
# 1425|-> 		memcpy(&tdb->transaction->hash_heads[chain], buf, len);
# 1426|   	}
# 1427|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def448]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1459:17: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1562:12: enter_function: entry to ‘transaction_expand_file’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:1562:12: call_function: calling ‘transaction_write’ from ‘transaction_expand_file’
# 1457|   			partial = el->offset + el->length - off;
# 1458|   		}
# 1459|-> 		memcpy(el->data + (off - el->offset), buf, partial);
# 1460|   		len -= partial;
# 1461|   		off += partial;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:2200:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:41: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3951:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:27: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3959:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3964:25: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3983:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3990:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3990:13: call_function: calling ‘ext2fs_tdb_transaction_recover’ from ‘ext2fs_tdb_open_ex’
# 2198|   
# 2199|   	/* read the full recovery data */
# 2200|-> 	if (tdb->methods->tdb_read(tdb, recovery_head + sizeof(rec), data,
# 2201|   				   rec.data_len, 0) == -1) {
# 2202|   		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery data\n"));

Error: GCC_ANALYZER_WARNING: [#def450]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3780:13: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘-1’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
# 3778|   	/* Don't endian-convert the magic food! */
# 3779|   	memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
# 3780|-> 	if (write(tdb->fd, newdb, size) != size) {
# 3781|   		ret = -1;
# 3782|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3780:13: warning[-Wanalyzer-malloc-leak]: leak of ‘newdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3755:44: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3755:12: branch_false: following ‘false’ branch (when ‘newdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3759:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3761:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3769:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3769:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3772:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3772:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3776:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3780:13: throw: if ‘write’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3780:13: danger: ‘newdb’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 3778|   	/* Don't endian-convert the magic food! */
# 3779|   	memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
# 3780|-> 	if (write(tdb->fd, newdb, size) != size) {
# 3781|   		ret = -1;
# 3782|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3780:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
# 3778|   	/* Don't endian-convert the magic food! */
# 3779|   	memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
# 3780|-> 	if (write(tdb->fd, newdb, size) != size) {
# 3781|   		ret = -1;
# 3782|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3869:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3869:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3869:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3869:17: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/1)
# 3867|   
# 3868|   	if ((open_flags & O_ACCMODE) == O_WRONLY) {
# 3869|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
# 3870|   			 name));
# 3871|   		errno = EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3889:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:21: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3888:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3889:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3889:25: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3889:25: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/1)
# 3887|   		tdb->flags &= ~TDB_CLEAR_IF_FIRST;
# 3888|   		if (tdb_new_database(tdb, hash_size) != 0) {
# 3889|-> 			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: tdb_new_database failed!"));
# 3890|   			goto fail;
# 3891|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/1)
# 3893|   	}
# 3894|   
# 3895|-> 	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
# 3896|   		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
# 3897|   			 name, strerror(errno)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3896:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3896:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3896:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3896:17: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/1)
# 3894|   
# 3895|   	if ((tdb->fd = open(name, open_flags, mode)) == -1) {
# 3896|-> 		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_open_ex: could not open file %s: %s\n",
# 3897|   			 name, strerror(errno)));
# 3898|   		goto fail;	/* errno set by open(2) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3913:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3910:24: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3911:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3912:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3913:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3913:25: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3913:25: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/1)
# 3911|   		open_flags |= O_CREAT;
# 3912|   		if (ftruncate(tdb->fd, 0) == -1) {
# 3913|-> 			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: "
# 3914|   				 "failed to truncate %s: %s\n",
# 3915|   				 name, strerror(errno)));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: call_function: calling ‘tdb_new_database’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:48: return_function: returning to ‘ext2fs_tdb_open_ex’ from ‘tdb_new_database’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3926:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3930:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3936:12: branch_true: following ‘true’ branch (when ‘rev == 0’)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3937:28: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/22)
# 3944|   
# 3945|   	if (tdb->header.rwlocks != 0) {
# 3946|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
# 3947|   		goto fail;
# 3948|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3832:21: enter_function: entry to ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:43: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3843:12: branch_false: following ‘false’ branch (when ‘tdb’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3848:9: call_function: inlined call to ‘tdb_io_init’ from ‘ext2fs_tdb_open_ex’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3854:12: branch_true: following ‘true’ branch (when ‘log_ctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3855:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3864:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3868:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3875:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3877:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3885:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:24: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3895:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3902:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3909:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3921:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3920:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3923:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3942:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3945:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3946:17: danger: ‘tdb’ leaks here; was allocated at [(2)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/1)
# 3944|   
# 3945|   	if (tdb->header.rwlocks != 0) {
# 3946|-> 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: spinlocks no longer supported\n"));
# 3947|   		goto fail;
# 3948|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:4018:21: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3817:21: enter_function: entry to ‘ext2fs_tdb_open’
e2fsprogs-1.47.3/lib/ext2fs/tdb.c:3820:16: call_function: calling ‘ext2fs_tdb_open_ex’ from ‘ext2fs_tdb_open’
# 4016|   	SAFE_FREE(tdb->name);
# 4017|   	if (tdb->fd != -1)
# 4018|-> 		if (close(tdb->fd) != 0)
# 4019|   			TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: failed to close tdb->fd on error!\n"));
# 4020|   	SAFE_FREE(tdb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:156:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(96)’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:153:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:156:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:156:9: danger: ‘malloc(96)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
#  154|   	if (retval)
#  155|   		goto cleanup;
#  156|-> 	io->manager = test_io_manager;
#  157|   	retval = ext2fs_get_mem(strlen(name)+1, &io->name);
#  158|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:172:26: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
#  170|   	data->magic = EXT2_ET_MAGIC_TEST_IO_CHANNEL;
#  171|   	if (test_io_backing_manager) {
#  172|-> 		retval = test_io_backing_manager->open(name, flags,
#  173|   						       &data->real);
#  174|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:187:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:187:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:187:22: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
#  185|   
#  186|   	data->outfile = NULL;
#  187|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_LOGFILE")) != NULL)
#  188|   		data->outfile = fopen(value, "w");
#  189|   	if (!data->outfile)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def464]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: warning[-Wanalyzer-file-leak]: leak of FILE
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:187:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:188:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:188:33: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:189:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:192:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: danger: leaks here; was opened at [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
#  191|   
#  192|   	data->flags = 0;
#  193|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_FLAGS")) != NULL)
#  194|   		data->flags = strtoul(value, NULL, 0);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:187:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:188:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:188:33: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:189:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:192:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:22: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/11)
#  191|   
#  192|   	data->flags = 0;
#  193|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_FLAGS")) != NULL)
#  194|   		data->flags = strtoul(value, NULL, 0);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:197:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:189:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:190:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:196:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:197:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:197:22: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
#  195|   
#  196|   	data->block = 0;
#  197|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_BLOCK")) != NULL)
#  198|   		data->block = strtoul(value, NULL, 0);
#  199|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:201:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:189:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:190:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:196:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:201:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:201:22: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/7)
#  199|   
#  200|   	data->read_abort_count = 0;
#  201|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_READ_ABORT")) != NULL)
#  202|   		data->read_abort_count = strtoul(value, NULL, 0);
#  203|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:205:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:139:18: enter_function: entry to ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:146:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:148:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:157:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘test_open’
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:171:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:179:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:189:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:190:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:193:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:196:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:201:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:204:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:205:22: throw: if ‘ext2fs_safe_getenv’ throws an exception...
e2fsprogs-1.47.3/lib/ext2fs/test_io.c:205:22: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/7)
#  203|   
#  204|   	data->write_abort_count = 0;
#  205|-> 	if ((value = ext2fs_safe_getenv("TEST_IO_WRITE_ABORT")) != NULL)
#  206|   		data->write_abort_count = strtoul(value, NULL, 0);
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
e2fsprogs-1.47.3/lib/ext2fs/undo_io.c:398:22: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(*data.tdb_data_size)’
e2fsprogs-1.47.3/lib/ext2fs/undo_io.c:880:18: enter_function: entry to ‘undo_write_blk64’
e2fsprogs-1.47.3/lib/ext2fs/undo_io.c:888:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ext2fs/undo_io.c:892:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/ext2fs/undo_io.c:892:18: call_function: calling ‘undo_write_tdb’ from ‘undo_write_blk64’
#  396|   		memset(read_ptr, 0, data->tdb_data_size);
#  397|   		actual_size = 0;
#  398|-> 		if ((data->tdb_data_size % channel->block_size) == 0)
#  399|   			sz = data->tdb_data_size / channel->block_size;
#  400|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
e2fsprogs-1.47.3/lib/ss/error.c:28:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ss_name(sci_idx)’
e2fsprogs-1.47.3/lib/ss/error.c:62:6: enter_function: entry to ‘ss_error’
e2fsprogs-1.47.3/lib/ss/error.c:68:14: call_function: calling ‘ss_name’ from ‘ss_error’
e2fsprogs-1.47.3/lib/ss/error.c:68:14: return_function: returning to ‘ss_error’ from ‘ss_name’
e2fsprogs-1.47.3/lib/ss/error.c:69:5: throw: if ‘com_err_va’ throws an exception...
e2fsprogs-1.47.3/lib/ss/error.c:28:13: danger: ‘ss_name(sci_idx)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   26|       register ss_data *infop;
#   27|   
#   28|->     infop = ss_info(sci_idx);
#   29|       if (infop->current_request == (char const *)NULL) {
#   30|   	ret_val = malloc((unsigned)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def471]
e2fsprogs-1.47.3/lib/ss/error.c:69:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
e2fsprogs-1.47.3/lib/ss/error.c:62:6: enter_function: entry to ‘ss_error’
e2fsprogs-1.47.3/lib/ss/error.c:67:5: acquire_resource: ‘va_start’ called here
e2fsprogs-1.47.3/lib/ss/error.c:68:14: call_function: calling ‘ss_name’ from ‘ss_error’
e2fsprogs-1.47.3/lib/ss/error.c:68:14: return_function: returning to ‘ss_error’ from ‘ss_name’
e2fsprogs-1.47.3/lib/ss/error.c:69:5: throw: if ‘com_err_va’ throws an exception...
e2fsprogs-1.47.3/lib/ss/error.c:69:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#   67|       va_start (pvar, fmt);
#   68|       whoami = ss_name (sci_idx);
#   69|->     com_err_va (whoami, code, fmt, pvar);
#   70|       free (whoami);
#   71|       va_end(pvar);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
e2fsprogs-1.47.3/lib/ss/help.c:65:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_true: following ‘true’ branch (when ‘argc != 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:57:30: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:57:18: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/help.c:58:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:63:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:65:9: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:65:9: danger: ‘buffer’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   63|   	sprintf(buffer, "usage:\n\t%s [topic|command]\nor\t%s\n",
#   64|   		request_name, request_name);
#   65|-> 	ss_perror(sci_idx, 0, buffer);
#   66|   	free(buffer);
#   67|   	return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
e2fsprogs-1.47.3/lib/ss/help.c:90:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:79:18: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:90:14: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:90:14: danger: ‘buffer’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#   88|   	(void) strcat(buffer, argv[1]);
#   89|   	(void) strcat(buffer, ".info");
#   90|-> 	fd = open(buffer, O_RDONLY);
#   91|   	free(buffer);
#   92|   	if (fd >= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
e2fsprogs-1.47.3/lib/ss/help.c:105:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:79:18: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:92:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:78:66: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:95:8: branch_true: following ‘true’ branch (when ‘fd < 0’)...
e2fsprogs-1.47.3/lib/ss/help.c:97:43: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:97:21: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/help.c:98:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:103:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:105:9: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:105:9: danger: ‘buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
#  103|   	strcpy(buf, MSG);
#  104|   	strcat(buf, argv[1]);
#  105|-> 	ss_perror(sci_idx, 0, buf);
#  106|   	free(buf);
#  107|   	return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def475]
e2fsprogs-1.47.3/lib/ss/help.c:111:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:90:14: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ss/help.c:95:8: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
e2fsprogs-1.47.3/lib/ss/help.c:109:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:111:9: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:111:9: danger: ‘fd’ leaks here; was opened at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  109|       switch (child = fork()) {
#  110|       case -1:
#  111|-> 	ss_perror(sci_idx, errno, "Can't fork for pager");
#  112|   	(void) close(fd);
#  113|   	return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def476]
e2fsprogs-1.47.3/lib/ss/help.c:112:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:90:14: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ss/help.c:95:8: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
e2fsprogs-1.47.3/lib/ss/help.c:109:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:112:16: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:112:16: danger: ‘fd’ leaks here; was opened at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  110|       case -1:
#  111|   	ss_perror(sci_idx, errno, "Can't fork for pager");
#  112|-> 	(void) close(fd);
#  113|   	return;
#  114|       case 0:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def477]
e2fsprogs-1.47.3/lib/ss/help.c:116:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:90:14: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ss/help.c:95:8: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
e2fsprogs-1.47.3/lib/ss/help.c:109:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:116:9: throw: if ‘ss_page_stdin’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:116:9: danger: ‘fd’ leaks here; was opened at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
#  114|       case 0:
#  115|   	(void) dup2(fd, 0); /* put file on stdin */
#  116|-> 	ss_page_stdin();
#  117|       default:
#  118|   	(void) close(fd); /* what can we do if it fails? */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def478]
e2fsprogs-1.47.3/lib/ss/help.c:118:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
e2fsprogs-1.47.3/lib/ss/help.c:51:8: branch_false: following ‘false’ branch (when ‘argc != 1’)...
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:55:13: branch_false: following ‘false’ branch (when ‘argc == 2’)...
e2fsprogs-1.47.3/lib/ss/help.c:70:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:70:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:74:8: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:78:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:79:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:81:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/help.c:86:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:90:14: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ss/help.c:95:8: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
e2fsprogs-1.47.3/lib/ss/help.c:109:21: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:118:16: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/lib/ss/help.c:118:16: danger: ‘fd’ leaks here; was opened at [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12)
#  116|   	ss_page_stdin();
#  117|       default:
#  118|-> 	(void) close(fd); /* what can we do if it fails? */
#  119|   	while (wait(NULL) != child) {
#  120|   	    /* do nothing if wrong pid */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
e2fsprogs-1.47.3/lib/ss/help.c:147:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(info_dir)’
e2fsprogs-1.47.3/lib/ss/help.c:139:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:143:14: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/help.c:143:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:147:5: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:147:5: danger: ‘opendir(info_dir)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  145|   	return;
#  146|       }
#  147|->     closedir(d);
#  148|       dirs = info->info_dirs;
#  149|       for (n_dirs = 0; dirs[n_dirs] != (char *)NULL; n_dirs++)

Error: GCC_ANALYZER_WARNING (CWE-465): [#def480]
e2fsprogs-1.47.3/lib/ss/help.c:153:8: warning[-Wanalyzer-deref-before-check]: check of ‘dirs’ for NULL after already dereferencing it
e2fsprogs-1.47.3/lib/ss/help.c:139:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:143:8: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:147:5: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:149:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/help.c:152:39: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/help.c:153:8: danger: pointer ‘dirs’ is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  151|       dirs = (char **)realloc((char *)dirs,
#  152|   			    (unsigned)(n_dirs + 2)*sizeof(char *));
#  153|->     if (dirs == (char **)NULL) {
#  154|   	*code_ptr = ENOMEM;
#  155|   	return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_table’
e2fsprogs-1.47.3/lib/ss/invocation.c:36:33: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/invocation.c:37:12: branch_false: following ‘false’ branch (when ‘new_table’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/invocation.c:39:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/invocation.c:41:12: branch_false: following ‘false’ branch (when ‘table’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: throw: if ‘initialize_ss_error_table’ throws an exception...
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: danger: ‘new_table’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   45|   		table[0] = table[1] = (ss_data *)NULL;
#   46|   	}
#   47|-> 	initialize_ss_error_table ();
#   48|   
#   49|   	for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: warning[-Wanalyzer-malloc-leak]: leak of ‘table’
e2fsprogs-1.47.3/lib/ss/invocation.c:37:12: branch_false: following ‘false’ branch (when ‘new_table’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/invocation.c:39:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/invocation.c:41:12: branch_true: following ‘true’ branch (when ‘table’ is NULL)...
e2fsprogs-1.47.3/lib/ss/invocation.c:42:38: branch_true: ...to here
e2fsprogs-1.47.3/lib/ss/invocation.c:42:38: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/ss/invocation.c:43:20: branch_false: following ‘false’ branch (when ‘table’ is non-NULL)...
e2fsprogs-1.47.3/lib/ss/invocation.c:45:28: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: throw: if ‘initialize_ss_error_table’ throws an exception...
e2fsprogs-1.47.3/lib/ss/invocation.c:47:9: danger: ‘table’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   45|   		table[0] = table[1] = (ss_data *)NULL;
#   46|   	}
#   47|-> 	initialize_ss_error_table ();
#   48|   
#   49|   	for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def483]
e2fsprogs-1.47.3/lib/ss/listen.c:40:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<return-value>’
#   38|   	    (void) fflush(stdout);
#   39|       }
#   40|-> }
#   41|   
#   42|   static sigret_t listen_int_handler(int sig __SS_ATTR((unused)))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def484]
e2fsprogs-1.47.3/lib/ss/pager.c:79:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[0]’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:79:23: danger: ‘filedes[0]’ leaks here
#   77|   
#   78|   	if (pipe(filedes) != 0)
#   79|-> 		return(-1);
#   80|   
#   81|   	switch(fork()) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def485]
e2fsprogs-1.47.3/lib/ss/pager.c:79:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[1]’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:79:23: danger: ‘filedes[1]’ leaks here
#   77|   
#   78|   	if (pipe(filedes) != 0)
#   79|-> 		return(-1);
#   80|   
#   81|   	switch(fork()) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def486]
e2fsprogs-1.47.3/lib/ss/pager.c:88:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(filedes[0], 0)’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:88:21: acquire_resource: opened here
e2fsprogs-1.47.3/lib/ss/pager.c:88:20: danger: ‘dup2(filedes[0], 0)’ leaks here; was opened at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#   86|   		 * Child; dup read half to 0, close all but 0, 1, and 2
#   87|   		 */
#   88|-> 		if (dup2(filedes[0], 0) == -1)
#   89|   			exit(1);
#   90|   		ss_page_stdin();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def487]
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[0]’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: danger: ‘filedes[0]’ leaks here
#   94|   		 * "write" side.
#   95|   		 */
#   96|-> 		(void) close(filedes[0]);
#   97|   		return(filedes[1]);
#   98|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def488]
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[1]’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/lib/ss/pager.c:96:24: danger: ‘filedes[1]’ leaks here
#   94|   		 * "write" side.
#   95|   		 */
#   96|-> 		(void) close(filedes[0]);
#   97|   		return(filedes[1]);
#   98|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def489]
e2fsprogs-1.47.3/lib/ss/pager.c:134:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[0]’
e2fsprogs-1.47.3/lib/ss/pager.c:74:5: enter_function: entry to ‘ss_pager_create’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:88:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:90:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:90:17: call_function: calling ‘ss_page_stdin’ from ‘ss_pager_create’
#  132|   
#  133|   	for (i = 3; i < 32; i++)
#  134|-> 		(void) close(i);
#  135|   	(void) signal(SIGINT, SIG_DFL);
#  136|   	sigprocmask(SIG_BLOCK, 0, &mask);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def490]
e2fsprogs-1.47.3/lib/ss/pager.c:134:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘filedes[1]’
e2fsprogs-1.47.3/lib/ss/pager.c:74:5: enter_function: entry to ‘ss_pager_create’
e2fsprogs-1.47.3/lib/ss/pager.c:78:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:81:16: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:88:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/ss/pager.c:90:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/ss/pager.c:90:17: call_function: calling ‘ss_page_stdin’ from ‘ss_pager_create’
#  132|   
#  133|   	for (i = 3; i < 32; i++)
#  134|-> 		(void) close(i);
#  135|   	(void) signal(SIGINT, SIG_DFL);
#  136|   	sigprocmask(SIG_BLOCK, 0, &mask);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
e2fsprogs-1.47.3/lib/support/mkquota.c:185:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(112)’
e2fsprogs-1.47.3/lib/support/mkquota.c:165:11: enter_function: entry to ‘quota_write_inode’
e2fsprogs-1.47.3/lib/support/mkquota.c:174:12: branch_false: following ‘false’ branch (when ‘qctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:177:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:178:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_write_inode’
e2fsprogs-1.47.3/lib/support/mkquota.c:185:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:185:18: throw: if ‘ext2fs_read_bitmaps’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:185:18: danger: ‘malloc(112)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  183|   	}
#  184|   
#  185|-> 	retval = ext2fs_read_bitmaps(fs);
#  186|   	if (retval) {
#  187|   		log_debug("Couldn't read bitmaps: %s", error_message(retval));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
e2fsprogs-1.47.3/lib/support/mkquota.c:192:22: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(112)’
e2fsprogs-1.47.3/lib/support/mkquota.c:165:11: enter_function: entry to ‘quota_write_inode’
e2fsprogs-1.47.3/lib/support/mkquota.c:174:12: branch_false: following ‘false’ branch (when ‘qctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:177:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:178:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_write_inode’
e2fsprogs-1.47.3/lib/support/mkquota.c:185:18: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:186:12: branch_false: following ‘false’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/lib/support/mkquota.c:186:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:191:25: branch_true: following ‘true’ branch (when ‘qtype != 3’)...
e2fsprogs-1.47.3/lib/support/mkquota.c:192:22: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:196:20: branch_false: following ‘false’ branch (when ‘dict’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:199:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:199:26: throw: if ‘quota_file_create’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:192:22: danger: ‘malloc(112)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  190|   
#  191|   	for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
#  192|-> 		if (((1 << qtype) & qtype_bits) == 0)
#  193|   			continue;
#  194|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
e2fsprogs-1.47.3/lib/support/mkquota.c:294:11: enter_function: entry to ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:302:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:309:25: branch_true: following ‘true’ branch (when ‘qtype != 3’)...
e2fsprogs-1.47.3/lib/support/mkquota.c:310:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:312:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:318:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:324:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: throw: if ‘dict_init’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: danger: ‘ctx’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  323|   		}
#  324|   		ctx->quota_dict[qtype] = dict;
#  325|-> 		dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp);
#  326|   		dict_set_allocator(dict, NULL, quota_dnode_free, NULL);
#  327|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(112)’
e2fsprogs-1.47.3/lib/support/mkquota.c:294:11: enter_function: entry to ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:302:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:309:25: branch_true: following ‘true’ branch (when ‘qtype != 3’)...
e2fsprogs-1.47.3/lib/support/mkquota.c:310:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:312:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:318:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:324:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: throw: if ‘dict_init’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:325:17: danger: ‘malloc(112)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/9)
#  323|   		}
#  324|   		ctx->quota_dict[qtype] = dict;
#  325|-> 		dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp);
#  326|   		dict_set_allocator(dict, NULL, quota_dnode_free, NULL);
#  327|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
e2fsprogs-1.47.3/lib/support/mkquota.c:326:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
e2fsprogs-1.47.3/lib/support/mkquota.c:294:11: enter_function: entry to ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:302:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:309:25: branch_true: following ‘true’ branch (when ‘qtype != 3’)...
e2fsprogs-1.47.3/lib/support/mkquota.c:310:17: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:312:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:318:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_init_context’
e2fsprogs-1.47.3/lib/support/mkquota.c:324:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:326:17: throw: if ‘dict_set_allocator’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:326:17: danger: ‘ctx’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  324|   		ctx->quota_dict[qtype] = dict;
#  325|   		dict_init(dict, DICTCOUNT_T_MAX, dict_uint_cmp);
#  326|-> 		dict_set_allocator(dict, NULL, quota_dnode_free, NULL);
#  327|   	}
#  328|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
e2fsprogs-1.47.3/lib/support/mkquota.c:379:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(96)’
e2fsprogs-1.47.3/lib/support/mkquota.c:365:22: enter_function: entry to ‘get_dq’
e2fsprogs-1.47.3/lib/support/mkquota.c:371:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:374:21: call_function: inlined call to ‘ext2fs_get_mem’ from ‘get_dq’
e2fsprogs-1.47.3/lib/support/mkquota.c:378:17: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:379:17: throw: if ‘dict_alloc_insert’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:379:17: danger: ‘malloc(96)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  377|   		}
#  378|   		memset(dq, 0, sizeof(struct dquot));
#  379|-> 		dict_alloc_insert(dict, UINT_TO_VOIDPTR(key), dq);
#  380|   		dq->dq_id = key;
#  381|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
e2fsprogs-1.47.3/lib/support/mkquota.c:498:23: warning[-Wanalyzer-malloc-leak]: leak of ‘inode’
e2fsprogs-1.47.3/lib/support/mkquota.c:482:12: branch_false: following ‘false’ branch (when ‘qctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:485:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:487:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:491:22: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:492:17: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/support/mkquota.c:493:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:493:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:498:23: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:498:23: danger: ‘inode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  496|   	}
#  497|   	while (1) {
#  498|-> 		ret = ext2fs_get_next_inode_full(scan, &ino,
#  499|   						 EXT2_INODE(inode), inode_size);
#  500|   		if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
e2fsprogs-1.47.3/lib/support/mkquota.c:597:15: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(112)’
e2fsprogs-1.47.3/lib/support/mkquota.c:581:11: enter_function: entry to ‘quota_read_all_dquots’
e2fsprogs-1.47.3/lib/support/mkquota.c:588:12: branch_false: following ‘false’ branch (when ‘qctx’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:591:15: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_read_all_dquots’
e2fsprogs-1.47.3/lib/support/mkquota.c:597:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:597:15: throw: if ‘quota_file_open’ throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:597:15: danger: ‘malloc(112)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  595|   	}
#  596|   
#  597|-> 	err = quota_file_open(qctx, qh, qf_ino, qtype, -1, 0);
#  598|   	if (err) {
#  599|   		log_debug("Open quota file failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
e2fsprogs-1.47.3/lib/support/mkquota.c:701:23: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/lib/support/mkquota.c:687:15: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/support/mkquota.c:688:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:693:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:694:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/mkquota.c:697:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/mkquota.c:698:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/mkquota.c:701:23: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/mkquota.c:701:23: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  699|   			next = p + 1;
#  700|   		}
#  701|-> 		ret = func(token);
#  702|   		if (ret)
#  703|   			break;

Error: COMPILER_WARNING (CWE-704): [#def500]
e2fsprogs-1.47.3/lib/support/profile.c: scope_hint: In function ‘profile_set_default’
e2fsprogs-1.47.3/lib/support/profile.c:425:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  425 |                 end = strchr(in, '\n');
#      |                     ^
#  423|   	in = def_string;
#  424|   	while (*in) {
#  425|-> 		end = strchr(in, '\n');
#  426|   		len = end ? (end - in) : (int) strlen(in);
#  427|   		if (len >= line_size) {

Error: COMPILER_WARNING (CWE-704): [#def501]
e2fsprogs-1.47.3/lib/support/profile.c:425:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  423|   	in = def_string;
#  424|   	while (*in) {
#  425|-> 		end = strchr(in, '\n');
#  426|   		len = end ? (end - in) : (int) strlen(in);
#  427|   		if (len >= line_size) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
e2fsprogs-1.47.3/lib/support/profile.c:542:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:582:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:583:20: branch_true: following ‘true’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/lib/support/profile.c:583:20: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:542:24: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  540|   
#  541|   	if (prf->flags & PROFILE_FILE_NO_RELOAD)
#  542|-> 		return 0;
#  543|   
#  544|   #ifdef HAVE_STAT

Error: GCC_ANALYZER_WARNING (CWE-401): [#def503]
e2fsprogs-1.47.3/lib/support/profile.c:542:24: warning[-Wanalyzer-malloc-leak]: leak of ‘state.root_section’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:582:26: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:583:20: branch_true: following ‘true’ branch (when ‘retval == 0’)...
e2fsprogs-1.47.3/lib/support/profile.c:583:20: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:542:24: danger: ‘state.root_section’ leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#  540|   
#  541|   	if (prf->flags & PROFILE_FILE_NO_RELOAD)
#  542|-> 		return 0;
#  543|   
#  544|   #ifdef HAVE_STAT

Error: GCC_ANALYZER_WARNING (CWE-775): [#def504]
e2fsprogs-1.47.3/lib/support/profile.c:587:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*prf.filespec, "r")’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:580:13: acquire_resource: opened here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:588:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:589:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:589:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:591:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:591:26: call_function: calling ‘parse_line’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:591:26: return_function: returning to ‘profile_update_file’ from ‘parse_line’
e2fsprogs-1.47.3/lib/support/profile.c:592:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:593:29: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:593:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:594:33: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: danger: ‘fopen(*prf.filespec, "r")’ leaks here; was opened at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  585|   		return retval;
#  586|   	}
#  587|-> 	prf->upd_serial++;
#  588|   	while (!feof(f)) {
#  589|   		if (fgets(buf, sizeof(buf), f) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
e2fsprogs-1.47.3/lib/support/profile.c:587:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*prf.filespec, "r")’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:580:13: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:588:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:589:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:589:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:591:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:591:26: call_function: calling ‘parse_line’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:591:26: return_function: returning to ‘profile_update_file’ from ‘parse_line’
e2fsprogs-1.47.3/lib/support/profile.c:592:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:593:29: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:593:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:594:33: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: danger: ‘fopen(*prf.filespec, "r")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  585|   		return retval;
#  586|   	}
#  587|-> 	prf->upd_serial++;
#  588|   	while (!feof(f)) {
#  589|   		if (fgets(buf, sizeof(buf), f) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
e2fsprogs-1.47.3/lib/support/profile.c:594:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:588:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:589:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:589:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:591:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:591:26: call_function: calling ‘parse_line’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:591:26: return_function: returning to ‘profile_update_file’ from ‘parse_line’
e2fsprogs-1.47.3/lib/support/profile.c:592:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:593:29: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:593:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:594:33: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  592|   		if (retval) {
#  593|   			if (syntax_err_cb)
#  594|-> 				(syntax_err_cb)(prf->filespec, retval,
#  595|   						state.line_num);
#  596|   			fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
e2fsprogs-1.47.3/lib/support/profile.c:594:33: warning[-Wanalyzer-malloc-leak]: leak of ‘state.root_section’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:588:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:589:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:589:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:591:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:591:26: call_function: calling ‘parse_line’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:591:26: return_function: returning to ‘profile_update_file’ from ‘parse_line’
e2fsprogs-1.47.3/lib/support/profile.c:592:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:593:29: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:593:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:594:33: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/profile.c:594:33: danger: ‘state.root_section’ leaks here; was allocated at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
#  592|   		if (retval) {
#  593|   			if (syntax_err_cb)
#  594|-> 				(syntax_err_cb)(prf->filespec, retval,
#  595|   						state.line_num);
#  596|   			fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def508]
e2fsprogs-1.47.3/lib/support/profile.c:838:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘node’
e2fsprogs-1.47.3/lib/support/profile.c:528:11: enter_function: entry to ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: call_function: calling ‘profile_create_node’ from ‘profile_update_file’
e2fsprogs-1.47.3/lib/support/profile.c:576:18: return_function: returning to ‘profile_update_file’ from ‘profile_create_node’
e2fsprogs-1.47.3/lib/support/profile.c:577:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:579:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:581:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:587:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:588:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:589:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:589:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile.c:591:26: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile.c:591:26: call_function: calling ‘parse_line’ from ‘profile_update_file’
#  836|   	profile_add_node(state->current_section, tag, value, &node);
#  837|   	if (p)
#  838|-> 		node->final = 1;
#  839|   	return 0;
#  840|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
e2fsprogs-1.47.3/lib/support/profile_helpers.c:160:31: warning[-Wanalyzer-malloc-leak]: leak of ‘values.list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:143:1: enter_function: entry to ‘profile_get_values’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:151:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:156:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:156:23: call_function: calling ‘init_list’ from ‘profile_get_values’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:156:23: return_function: returning to ‘profile_get_values’ from ‘init_list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:156:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:156:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:160:31: throw: if ‘profile_iterator’ throws an exception...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:160:31: danger: ‘values.list’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  158|   
#  159|   	do {
#  160|-> 		if ((retval = profile_iterator(&state, 0, &value)))
#  161|   			goto cleanup;
#  162|   		if (value)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def510]
e2fsprogs-1.47.3/lib/support/profile_helpers.c:203:31: warning[-Wanalyzer-malloc-leak]: leak of ‘values.list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:186:1: enter_function: entry to ‘profile_get_subsection_names’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:194:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:199:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:199:23: call_function: calling ‘init_list’ from ‘profile_get_subsection_names’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:199:23: return_function: returning to ‘profile_get_subsection_names’ from ‘init_list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:199:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:203:31: throw: if ‘profile_iterator’ throws an exception...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:203:31: danger: ‘values.list’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  201|   
#  202|   	do {
#  203|-> 		if ((retval = profile_iterator(&state, &name, 0)))
#  204|   			goto cleanup;
#  205|   		if (name)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
e2fsprogs-1.47.3/lib/support/profile_helpers.c:241:31: warning[-Wanalyzer-malloc-leak]: leak of ‘values.list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:224:1: enter_function: entry to ‘profile_get_relation_names’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:232:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:237:23: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:237:23: call_function: calling ‘init_list’ from ‘profile_get_relation_names’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:237:23: return_function: returning to ‘profile_get_relation_names’ from ‘init_list’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:237:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:237:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:241:31: throw: if ‘profile_iterator’ throws an exception...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:241:31: danger: ‘values.list’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  239|   
#  240|   	do {
#  241|-> 		if ((retval = profile_iterator(&state, &name, 0)))
#  242|   			goto cleanup;
#  243|   		if (name) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:286:12: branch_false: following ‘false’ branch (when ‘filenames’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:286:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:290:32: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:291:27: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:292:40: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:293:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:293:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:301:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:302:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: throw: if ‘profile_init’ throws an exception...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  307|   	filenames[i] = 0;
#  308|   
#  309|-> 	retval = profile_init((const char * const *) filenames,
#  310|   			      ret_profile);
#  311|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: warning[-Wanalyzer-malloc-leak]: leak of ‘filenames’
e2fsprogs-1.47.3/lib/support/profile_helpers.c:285:31: acquire_memory: allocated here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:286:12: branch_false: following ‘false’ branch (when ‘filenames’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:286:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:290:32: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:291:27: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:293:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:293:20: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:301:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:302:25: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: throw: if ‘profile_init’ throws an exception...
e2fsprogs-1.47.3/lib/support/profile_helpers.c:309:18: danger: ‘filenames’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  307|   	filenames[i] = 0;
#  308|   
#  309|-> 	retval = profile_init((const char * const *) filenames,
#  310|   			      ret_profile);
#  311|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
e2fsprogs-1.47.3/lib/support/quotaio.c:249:14: warning[-Wanalyzer-malloc-leak]: leak of ‘h’
e2fsprogs-1.47.3/lib/support/quotaio.c:188:11: enter_function: entry to ‘quota_file_open’
e2fsprogs-1.47.3/lib/support/quotaio.c:197:12: branch_false: following ‘false’ branch (when ‘qtype <= 2’)...
e2fsprogs-1.47.3/lib/support/quotaio.c:200:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:207:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:217:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:217:12: branch_true: following ‘true’ branch (when ‘h’ is NULL)...
e2fsprogs-1.47.3/lib/support/quotaio.c:218:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:227:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_file_open’
e2fsprogs-1.47.3/lib/support/quotaio.c:236:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:248:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:249:14: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:249:14: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/quotaio.c:249:14: danger: ‘h’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  247|   
#  248|   	if (h->qh_ops->check_file &&
#  249|-> 	    (h->qh_ops->check_file(h, qtype, fmt) == 0)) {
#  250|   		log_err("qh_ops->check_file failed");
#  251|   		err = EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
e2fsprogs-1.47.3/lib/support/quotaio.c:255:36: warning[-Wanalyzer-malloc-leak]: leak of ‘h’
e2fsprogs-1.47.3/lib/support/quotaio.c:188:11: enter_function: entry to ‘quota_file_open’
e2fsprogs-1.47.3/lib/support/quotaio.c:197:12: branch_false: following ‘false’ branch (when ‘qtype <= 2’)...
e2fsprogs-1.47.3/lib/support/quotaio.c:200:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:204:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:207:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:217:12: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:217:12: branch_true: following ‘true’ branch (when ‘h’ is NULL)...
e2fsprogs-1.47.3/lib/support/quotaio.c:218:21: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:227:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘quota_file_open’
e2fsprogs-1.47.3/lib/support/quotaio.c:236:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:248:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:255:13: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:255:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/lib/support/quotaio.c:255:36: branch_true: ...to here
e2fsprogs-1.47.3/lib/support/quotaio.c:255:36: throw: if the called function throws an exception...
e2fsprogs-1.47.3/lib/support/quotaio.c:255:36: danger: ‘h’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  253|   	}
#  254|   
#  255|-> 	if (h->qh_ops->init_io && (h->qh_ops->init_io(h) < 0)) {
#  256|   		log_err("qh_ops->init_io failed");
#  257|   		err = EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:66:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:659:5: enter_function: entry to ‘qtree_scan_dquots’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:669:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:672:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:13: call_function: calling ‘ext2fs_get_memzero’ from ‘qtree_scan_dquots’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:13: return_function: returning to ‘qtree_scan_dquots’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:677:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:677:15: call_function: calling ‘report_tree’ from ‘qtree_scan_dquots’
#   64|   	int err;
#   65|   
#   66|-> 	err = h->e2fs_read(&h->qh_qf, blk << QT_BLKSIZE_BITS, buf,
#   67|   			QT_BLKSIZE);
#   68|   	if (err < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:546:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:659:5: enter_function: entry to ‘qtree_scan_dquots’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:669:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:672:9: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:13: call_function: calling ‘ext2fs_get_memzero’ from ‘qtree_scan_dquots’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:13: return_function: returning to ‘qtree_scan_dquots’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:673:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:677:15: branch_false: ...to here
e2fsprogs-1.47.3/lib/support/quotaio_tree.c:677:15: call_function: calling ‘report_tree’ from ‘qtree_scan_dquots’
#  544|   {
#  545|   	if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks) {
#  546|-> 		log_err("Illegal reference (%u >= %u) in %s quota file",
#  547|   			blk, h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
#  548|   			quota_type2name(h->qh_type));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
e2fsprogs-1.47.3/misc/badblocks.c:482:18: warning[-Wanalyzer-malloc-leak]: leak of ‘blkbuf’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:774:18: call_function: calling ‘allocate_buffer’ from ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:774:18: return_function: returning to ‘test_nd’ from ‘allocate_buffer’
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:788:9: call_function: inlined call to ‘flush_bufs’ from ‘test_nd’
#  480|   		return;
#  481|   #endif
#  482|-> 	retval = ext2fs_sync_device(host_dev, 1);
#  483|   	if (retval)
#  484|   		com_err(program_name, retval, "%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
e2fsprogs-1.47.3/misc/badblocks.c:482:18: warning[-Wanalyzer-malloc-leak]: leak of ‘test_record’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:775:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:788:9: call_function: inlined call to ‘flush_bufs’ from ‘test_nd’
#  480|   		return;
#  481|   #endif
#  482|-> 	retval = ext2fs_sync_device(host_dev, 1);
#  483|   	if (retval)
#  484|   		com_err(program_name, retval, "%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
e2fsprogs-1.47.3/misc/badblocks.c:484:17: warning[-Wanalyzer-malloc-leak]: leak of ‘blkbuf’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:774:18: call_function: calling ‘allocate_buffer’ from ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:774:18: return_function: returning to ‘test_nd’ from ‘allocate_buffer’
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:788:9: call_function: inlined call to ‘flush_bufs’ from ‘test_nd’
#  482|   	retval = ext2fs_sync_device(host_dev, 1);
#  483|   	if (retval)
#  484|-> 		com_err(program_name, retval, "%s",
#  485|   			_("during ext2fs_sync_device"));
#  486|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
e2fsprogs-1.47.3/misc/badblocks.c:484:17: warning[-Wanalyzer-malloc-leak]: leak of ‘test_record’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:775:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:788:9: call_function: inlined call to ‘flush_bufs’ from ‘test_nd’
#  482|   	retval = ext2fs_sync_device(host_dev, 1);
#  483|   	if (retval)
#  484|-> 		com_err(program_name, retval, "%s",
#  485|   			_("during ext2fs_sync_device"));
#  486|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
e2fsprogs-1.47.3/misc/badblocks.c:591:9: warning[-Wanalyzer-malloc-leak]: leak of ‘blkbuf’
e2fsprogs-1.47.3/misc/badblocks.c:1050:5: enter_function: entry to ‘main’
e2fsprogs-1.47.3/misc/badblocks.c:1097:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1194:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1195:21: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1195:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1201:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1201:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1208:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1208:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1209:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1208:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1214:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1214:12: branch_false: following ‘false’ branch (when ‘blocks_at_once != 0’)...
e2fsprogs-1.47.3/misc/badblocks.c:1225:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1225:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1227:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1232:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1238:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1238:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1249:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1249:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1253:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1253:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1260:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1260:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1266:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1266:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1269:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1270:21: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1270:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1272:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1277:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1277:12: branch_false: following ‘false’ branch (when ‘host_device_name’ is NULL)...
e2fsprogs-1.47.3/misc/badblocks.c:1286:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1287:12: branch_false: following ‘false’ branch (when ‘input_file’ is NULL)...
e2fsprogs-1.47.3/misc/badblocks.c:1301:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1301:12: branch_false: following ‘false’ branch (when ‘output_file’ is NULL)...
e2fsprogs-1.47.3/misc/badblocks.c:1313:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1316:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:1322:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1322:12: branch_false: following ‘false’ branch (when ‘in’ is NULL)...
e2fsprogs-1.47.3/misc/badblocks.c:1322:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:1360:28: call_function: calling ‘test_ro’ from ‘main’
#  589|   		fputs(_(done_string), stderr);
#  590|   
#  591|-> 	fflush (stderr);
#  592|   	free (blkbuf);
#  593|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
e2fsprogs-1.47.3/misc/badblocks.c:777:17: warning[-Wanalyzer-malloc-leak]: leak of ‘blkbuf’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:774:18: call_function: calling ‘allocate_buffer’ from ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:774:18: return_function: returning to ‘test_nd’ from ‘allocate_buffer’
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:777:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:777:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/badblocks.c:777:17: danger: ‘blkbuf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  775|   	test_record = malloc(blocks_at_once * sizeof(struct saved_blk_record));
#  776|   	if (!blkbuf || !test_record) {
#  777|-> 		com_err(program_name, ENOMEM, "%s",
#  778|   			_("while allocating buffers"));
#  779|   		exit (1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
e2fsprogs-1.47.3/misc/badblocks.c:777:17: warning[-Wanalyzer-malloc-leak]: leak of ‘test_record’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:775:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:777:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:777:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/badblocks.c:777:17: danger: ‘test_record’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  775|   	test_record = malloc(blocks_at_once * sizeof(struct saved_blk_record));
#  776|   	if (!blkbuf || !test_record) {
#  777|-> 		com_err(program_name, ENOMEM, "%s",
#  778|   			_("while allocating buffers"));
#  779|   		exit (1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
e2fsprogs-1.47.3/misc/badblocks.c:849:41: warning[-Wanalyzer-malloc-leak]: leak of ‘test_record’
e2fsprogs-1.47.3/misc/badblocks.c:741:21: enter_function: entry to ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:774:18: call_function: calling ‘allocate_buffer’ from ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:774:18: return_function: returning to ‘test_nd’ from ‘allocate_buffer’
e2fsprogs-1.47.3/misc/badblocks.c:775:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:798:13: setjmp: ‘setjmp’ called here
e2fsprogs-1.47.3/misc/badblocks.c:798:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:816:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:825:27: branch_true: following ‘true’ branch (when ‘nr_pattern > pat_idx’)...
e2fsprogs-1.47.3/misc/badblocks.c:827:30: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:826:17: call_function: calling ‘pattern_fill’ from ‘test_nd’
e2fsprogs-1.47.3/misc/badblocks.c:826:17: return_function: returning to ‘test_nd’ from ‘pattern_fill’
e2fsprogs-1.47.3/misc/badblocks.c:838:24: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:839:29: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:839:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:845:37: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:846:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:847:36: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:847:36: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:849:41: branch_true: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:849:41: throw: if ‘ext2fs_badblocks_list_iterate’ throws an exception...
e2fsprogs-1.47.3/misc/badblocks.c:849:41: danger: ‘test_record’ leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  847|   				if (currently_testing == next_bad) {
#  848|   					/* fprintf (out, "%lu\n", nextbad); */
#  849|-> 					ext2fs_badblocks_list_iterate (bb_iter, &next_bad);
#  850|   					currently_testing++;
#  851|   					goto check_for_more;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
e2fsprogs-1.47.3/misc/badblocks.c:984:9: warning[-Wanalyzer-malloc-leak]: leak of ‘test_record’
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:765:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:775:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/badblocks.c:776:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:782:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:798:13: setjmp: ‘setjmp’ called here
e2fsprogs-1.47.3/misc/badblocks.c:798:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/badblocks.c:816:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/badblocks.c:984:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/misc/badblocks.c:984:9: danger: ‘test_record’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  982|   	}
#  983|   	uncapture_terminate();
#  984|-> 	fflush(stderr);
#  985|   	free(blkbuf);
#  986|   	free(test_record);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
e2fsprogs-1.47.3/misc/chattr.c:220:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  218|   	if (LSTAT (name, &st) == -1) {
#  219|   		if (!silent)
#  220|-> 			com_err (program_name, errno,
#  221|   				 _("while trying to stat %s"), name);
#  222|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
e2fsprogs-1.47.3/misc/chattr.c:225:13: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  223|   	}
#  224|   
#  225|-> 	if (fgetflags(name, &flags) == -1) {
#  226|   		if (!silent)
#  227|   			com_err(program_name, errno,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
e2fsprogs-1.47.3/misc/chattr.c:227:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  225|   	if (fgetflags(name, &flags) == -1) {
#  226|   		if (!silent)
#  227|-> 			com_err(program_name, errno,
#  228|   					_("while reading flags on %s"), name);
#  229|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
e2fsprogs-1.47.3/misc/chattr.c:234:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  232|   		if (verbose) {
#  233|   			printf (_("Flags of %s set as "), name);
#  234|-> 			print_flags (stdout, sf, 0);
#  235|   			printf ("\n");
#  236|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
e2fsprogs-1.47.3/misc/chattr.c:237:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  235|   			printf ("\n");
#  236|   		}
#  237|-> 		if (fsetflags (name, sf) == -1)
#  238|   			perror (name);
#  239|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
e2fsprogs-1.47.3/misc/chattr.c:238:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  236|   		}
#  237|   		if (fsetflags (name, sf) == -1)
#  238|-> 			perror (name);
#  239|   	} else {
#  240|   		if (rem)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
e2fsprogs-1.47.3/misc/chattr.c:246:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  244|   		if (verbose) {
#  245|   			printf(_("Flags of %s set as "), name);
#  246|-> 			print_flags(stdout, flags, 0);
#  247|   			printf("\n");
#  248|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
e2fsprogs-1.47.3/misc/chattr.c:251:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/chattr.c:288:12: enter_function: entry to ‘chattr_dir_proc’
e2fsprogs-1.47.3/misc/chattr.c:293:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/chattr.c:296:24: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/chattr.c:297:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/chattr.c:303:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/chattr.c:304:23: call_function: calling ‘change_attributes’ from ‘chattr_dir_proc’
#  249|   		if (!S_ISDIR(st.st_mode))
#  250|   			flags &= ~EXT2_DIRSYNC_FL;
#  251|-> 		if (fsetflags(name, flags) == -1) {
#  252|   			if (!silent) {
#  253|   				com_err(program_name, errno,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
e2fsprogs-1.47.3/misc/create_inode.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  163|   			return 0;
#  164|   		retval = errno;
#  165|-> 		com_err(__func__, retval, _("while listing attributes of \"%s\""),
#  166|   			filename);
#  167|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
e2fsprogs-1.47.3/misc/create_inode.c:165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  163|   			return 0;
#  164|   		retval = errno;
#  165|-> 		com_err(__func__, retval, _("while listing attributes of \"%s\""),
#  166|   			filename);
#  167|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
e2fsprogs-1.47.3/misc/create_inode.c:172:18: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  170|   	}
#  171|   
#  172|-> 	retval = ext2fs_xattrs_open(fs, ino, &handle);
#  173|   	if (retval) {
#  174|   		if (retval == EXT2_ET_MISSING_EA_FEATURE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def538]
e2fsprogs-1.47.3/misc/create_inode.c:172:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  170|   	}
#  171|   
#  172|-> 	retval = ext2fs_xattrs_open(fs, ino, &handle);
#  173|   	if (retval) {
#  174|   		if (retval == EXT2_ET_MISSING_EA_FEATURE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
e2fsprogs-1.47.3/misc/create_inode.c:176:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  174|   		if (retval == EXT2_ET_MISSING_EA_FEATURE)
#  175|   			return 0;
#  176|-> 		com_err(__func__, retval, _("while opening inode %u"), ino);
#  177|   		return retval;
#  178|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
e2fsprogs-1.47.3/misc/create_inode.c:176:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  174|   		if (retval == EXT2_ET_MISSING_EA_FEATURE)
#  175|   			return 0;
#  176|-> 		com_err(__func__, retval, _("while opening inode %u"), ino);
#  177|   		return retval;
#  178|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def541]
e2fsprogs-1.47.3/misc/create_inode.c:180:18: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  178|   	}
#  179|   
#  180|-> 	retval = ext2fs_xattrs_read(handle);
#  181|   	if (retval) {
#  182|   		com_err(__func__, retval,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def542]
e2fsprogs-1.47.3/misc/create_inode.c:180:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  178|   	}
#  179|   
#  180|-> 	retval = ext2fs_xattrs_read(handle);
#  181|   	if (retval) {
#  182|   		com_err(__func__, retval,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
e2fsprogs-1.47.3/misc/create_inode.c:182:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  180|   	retval = ext2fs_xattrs_read(handle);
#  181|   	if (retval) {
#  182|-> 		com_err(__func__, retval,
#  183|   			_("while reading xattrs for inode %u"), ino);
#  184|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def544]
e2fsprogs-1.47.3/misc/create_inode.c:182:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  180|   	retval = ext2fs_xattrs_read(handle);
#  181|   	if (retval) {
#  182|-> 		com_err(__func__, retval,
#  183|   			_("while reading xattrs for inode %u"), ino);
#  184|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def545]
e2fsprogs-1.47.3/misc/create_inode.c:189:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  187|   	retval = ext2fs_get_mem(size, &list);
#  188|   	if (retval) {
#  189|-> 		com_err(__func__, retval, _("while allocating memory"));
#  190|   		goto out;
#  191|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def546]
e2fsprogs-1.47.3/misc/create_inode.c:189:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  187|   	retval = ext2fs_get_mem(size, &list);
#  188|   	if (retval) {
#  189|-> 		com_err(__func__, retval, _("while allocating memory"));
#  190|   		goto out;
#  191|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
e2fsprogs-1.47.3/misc/create_inode.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  194|   	if (size == -1) {
#  195|   		retval = errno;
#  196|-> 		com_err(__func__, retval, _("while listing attributes of \"%s\""),
#  197|   			filename);
#  198|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
e2fsprogs-1.47.3/misc/create_inode.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  194|   	if (size == -1) {
#  195|   		retval = errno;
#  196|-> 		com_err(__func__, retval, _("while listing attributes of \"%s\""),
#  197|   			filename);
#  198|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
e2fsprogs-1.47.3/misc/create_inode.c:230:26: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  228|   		}
#  229|   
#  230|-> 		retval = ext2fs_xattr_set(handle, name, value, value_size);
#  231|   		ext2fs_free_mem(&value);
#  232|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
e2fsprogs-1.47.3/misc/create_inode.c:230:26: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1243:26: call_function: calling ‘set_inode_xattr’ from ‘populate_fs3’
#  228|   		}
#  229|   
#  230|-> 		retval = ext2fs_xattr_set(handle, name, value, value_size);
#  231|   		ext2fs_free_mem(&value);
#  232|   		if (retval) {

Error: COMPILER_WARNING (CWE-704): [#def551]
e2fsprogs-1.47.3/misc/create_inode.c: scope_hint: In function ‘do_symlink_internal’
e2fsprogs-1.47.3/misc/create_inode.c:349:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  349 |         cp = strrchr(name, '/');
#      |            ^
#  347|   	errcode_t		retval;
#  348|   
#  349|-> 	cp = strrchr(name, '/');
#  350|   	if (cp) {
#  351|   		*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def552]
e2fsprogs-1.47.3/misc/create_inode.c:349:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  347|   	errcode_t		retval;
#  348|   
#  349|-> 	cp = strrchr(name, '/');
#  350|   	if (cp) {
#  351|   		*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def553]
e2fsprogs-1.47.3/misc/create_inode.c: scope_hint: In function ‘do_mkdir_internal’
e2fsprogs-1.47.3/misc/create_inode.c:386:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  386 |         cp = strrchr(name, '/');
#      |            ^
#  384|   
#  385|   
#  386|-> 	cp = strrchr(name, '/');
#  387|   	if (cp) {
#  388|   		*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def554]
e2fsprogs-1.47.3/misc/create_inode.c:386:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  384|   
#  385|   
#  386|-> 	cp = strrchr(name, '/');
#  387|   	if (cp) {
#  388|   		*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def555]
e2fsprogs-1.47.3/misc/create_inode.c: scope_hint: In function ‘do_write_internal’
e2fsprogs-1.47.3/misc/create_inode.c:792:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  792 |         cp = strrchr(dest, '/');
#      |            ^
#  790|   	}
#  791|   
#  792|-> 	cp = strrchr(dest, '/');
#  793|   	if (cp) {
#  794|   		*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def556]
e2fsprogs-1.47.3/misc/create_inode.c:792:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  790|   	}
#  791|   
#  792|-> 	cp = strrchr(dest, '/');
#  793|   	if (cp) {
#  794|   		*cp = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def557]
e2fsprogs-1.47.3/misc/create_inode.c:875:29: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_info.path’ where non-null expected
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: this call could return NULL
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  873|   		target->path = p;
#  874|   	}
#  875|-> 	target->path_len += sprintf(target->path + target->path_len, "/%s",
#  876|   				    file);
#  877|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
e2fsprogs-1.47.3/misc/create_inode.c:959:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  957|   	if (chdir(source_dir) < 0) {
#  958|   		retval = errno;
#  959|-> 		com_err(__func__, retval,
#  960|   			_("while changing working directory to \"%s\""),
#  961|   			source_dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
e2fsprogs-1.47.3/misc/create_inode.c:959:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  957|   	if (chdir(source_dir) < 0) {
#  958|   		retval = errno;
#  959|-> 		com_err(__func__, retval,
#  960|   			_("while changing working directory to \"%s\""),
#  961|   			source_dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
e2fsprogs-1.47.3/misc/create_inode.c:965:21: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  963|   	}
#  964|   
#  965|-> 	num_dents = scandir(".", &dent, NULL, alphasort);
#  966|   
#  967|   	if (num_dents < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
e2fsprogs-1.47.3/misc/create_inode.c:965:21: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  963|   	}
#  964|   
#  965|-> 	num_dents = scandir(".", &dent, NULL, alphasort);
#  966|   
#  967|   	if (num_dents < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
e2fsprogs-1.47.3/misc/create_inode.c:969:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  967|   	if (num_dents < 0) {
#  968|   		retval = errno;
#  969|-> 		com_err(__func__, retval,
#  970|   			_("while scanning directory \"%s\""), source_dir);
#  971|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
e2fsprogs-1.47.3/misc/create_inode.c:969:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  967|   	if (num_dents < 0) {
#  968|   		retval = errno;
#  969|-> 		com_err(__func__, retval,
#  970|   			_("while scanning directory \"%s\""), source_dir);
#  971|   		return retval;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
e2fsprogs-1.47.3/misc/create_inode.c:980:25: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  978|   		if (lstat(name, &st)) {
#  979|   			retval = errno;
#  980|-> 			com_err(__func__, retval, _("while lstat \"%s\""),
#  981|   				name);
#  982|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
e2fsprogs-1.47.3/misc/create_inode.c:980:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  978|   		if (lstat(name, &st)) {
#  979|   			retval = errno;
#  980|-> 			com_err(__func__, retval, _("while lstat \"%s\""),
#  981|   				name);
#  982|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def566]
e2fsprogs-1.47.3/misc/create_inode.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  982|   			goto out;
#  983|   		}
#  984|-> 		if (fgetflags(name, &fl) < 0)
#  985|   			fl = 0;
#  986|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
e2fsprogs-1.47.3/misc/create_inode.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1189:11: enter_function: entry to ‘populate_fs3’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1242:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1242:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1251:18: call_function: calling ‘__populate_fs’ from ‘populate_fs3’
#  982|   			goto out;
#  983|   		}
#  984|-> 		if (fgetflags(name, &fl) < 0)
#  985|   			fl = 0;
#  986|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: throw: if ‘__populate_fs_from_tar’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: danger: ‘file_info.path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
# 1221|   	 */
# 1222|   	if (strcmp(source, "-") == 0) {
# 1223|-> 		retval = __populate_fs_from_tar(fs, parent_ino, NULL, root,
# 1224|   						&hdlinks, &file_info, flags,
# 1225|   						fs_callbacks);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: throw: if ‘__populate_fs_from_tar’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1223:26: danger: ‘hdlinks.hdl’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
# 1221|   	 */
# 1222|   	if (strcmp(source, "-") == 0) {
# 1223|-> 		retval = __populate_fs_from_tar(fs, parent_ino, NULL, root,
# 1224|   						&hdlinks, &file_info, flags,
# 1225|   						fs_callbacks);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1231:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: danger: ‘file_info.path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
# 1230|   	if (stat(source, &st)) {
# 1231|   		retval = errno;
# 1232|-> 		com_err(__func__, retval, _("while calling stat"));
# 1233|   		goto out;
# 1234|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1231:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1232:17: danger: ‘hdlinks.hdl’ leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
# 1230|   	if (stat(source, &st)) {
# 1231|   		retval = errno;
# 1232|-> 		com_err(__func__, retval, _("while calling stat"));
# 1233|   		goto out;
# 1234|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: warning[-Wanalyzer-malloc-leak]: leak of ‘file_info.path’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1213:26: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: throw: if ‘__populate_fs_from_tar’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: danger: ‘file_info.path’ leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
# 1234|   	}
# 1235|   	if (S_ISREG(st.st_mode)) {
# 1236|-> 		retval = __populate_fs_from_tar(fs, parent_ino, source, root,
# 1237|   						&hdlinks, &file_info, flags,
# 1238|   						fs_callbacks);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: warning[-Wanalyzer-malloc-leak]: leak of ‘hdlinks.hdl’
e2fsprogs-1.47.3/misc/create_inode.c:1197:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1202:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1204:23: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/create_inode.c:1205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1211:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1222:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/create_inode.c:1230:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1230:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1235:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1235:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: throw: if ‘__populate_fs_from_tar’ throws an exception...
e2fsprogs-1.47.3/misc/create_inode.c:1236:26: danger: ‘hdlinks.hdl’ leaks here; was allocated at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
# 1234|   	}
# 1235|   	if (S_ISREG(st.st_mode)) {
# 1236|-> 		retval = __populate_fs_from_tar(fs, parent_ino, source, root,
# 1237|   						&hdlinks, &file_info, flags,
# 1238|   						fs_callbacks);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: throw: if ‘ext2fs_group_first_block2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  191|   		printf("group:block:super:gdt:bbitmap:ibitmap:itable\n");
#  192|   	for (i = 0; i < fs->group_desc_count; i++) {
#  193|-> 		first_block = ext2fs_group_first_block2(fs, i);
#  194|   		last_block = ext2fs_group_last_block2(fs, i);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: throw: if ‘ext2fs_group_first_block2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  191|   		printf("group:block:super:gdt:bbitmap:ibitmap:itable\n");
#  192|   	for (i = 0; i < fs->group_desc_count; i++) {
#  193|-> 		first_block = ext2fs_group_first_block2(fs, i);
#  194|   		last_block = ext2fs_group_last_block2(fs, i);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: throw: if ‘ext2fs_group_last_block2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  192|   	for (i = 0; i < fs->group_desc_count; i++) {
#  193|   		first_block = ext2fs_group_first_block2(fs, i);
#  194|-> 		last_block = ext2fs_group_last_block2(fs, i);
#  195|   
#  196|   		ext2fs_super_and_bgd_loc2(fs, i, &super_blk,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: throw: if ‘ext2fs_group_last_block2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:194:30: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  192|   	for (i = 0; i < fs->group_desc_count; i++) {
#  193|   		first_block = ext2fs_group_first_block2(fs, i);
#  194|-> 		last_block = ext2fs_group_last_block2(fs, i);
#  195|   
#  196|   		ext2fs_super_and_bgd_loc2(fs, i, &super_blk,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: throw: if ‘ext2fs_super_and_bgd_loc2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  194|   		last_block = ext2fs_group_last_block2(fs, i);
#  195|   
#  196|-> 		ext2fs_super_and_bgd_loc2(fs, i, &super_blk,
#  197|   					  &old_desc_blk, &new_desc_blk, 0);
#  198|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: throw: if ‘ext2fs_super_and_bgd_loc2’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:196:17: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  194|   		last_block = ext2fs_group_last_block2(fs, i);
#  195|   
#  196|-> 		ext2fs_super_and_bgd_loc2(fs, i, &super_blk,
#  197|   					  &old_desc_blk, &new_desc_blk, 0);
#  198|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: throw: if ‘ext2fs_block_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  212|   				printf("-1:");
#  213|   			printf("%llu:%llu:%llu\n",
#  214|-> 			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|   			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|   			       (unsigned long long) ext2fs_inode_table_loc(fs, i));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: throw: if ‘ext2fs_block_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:214:53: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  212|   				printf("-1:");
#  213|   			printf("%llu:%llu:%llu\n",
#  214|-> 			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|   			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|   			       (unsigned long long) ext2fs_inode_table_loc(fs, i));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: throw: if ‘ext2fs_inode_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  213|   			printf("%llu:%llu:%llu\n",
#  214|   			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|-> 			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|   			       (unsigned long long) ext2fs_inode_table_loc(fs, i));
#  217|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: throw: if ‘ext2fs_inode_bitmap_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:215:53: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  213|   			printf("%llu:%llu:%llu\n",
#  214|   			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|-> 			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|   			       (unsigned long long) ext2fs_inode_table_loc(fs, i));
#  217|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:205:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:207:45: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  214|   			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|   			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|-> 			       (unsigned long long) ext2fs_inode_table_loc(fs, i));
#  217|   			continue;
#  218|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_true: following ‘true’ branch (when ‘grp_only != 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:200:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:201:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:202:33: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:205:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:207:45: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:216:53: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  214|   			       (unsigned long long) ext2fs_block_bitmap_loc(fs, i),
#  215|   			       (unsigned long long) ext2fs_inode_bitmap_loc(fs, i),
#  216|-> 			       (unsigned long long) ext2fs_inode_table_loc(fs, i));
#  217|   			continue;
#  218|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_false: following ‘false’ branch (when ‘grp_only == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:220:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: throw: if ‘ext2fs_bg_checksum’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  222|   		fputs(")", stdout);
#  223|   		if (ext2fs_has_group_desc_csum(fs)) {
#  224|-> 			unsigned csum = ext2fs_bg_checksum(fs, i);
#  225|   			unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
#  226|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_false: following ‘false’ branch (when ‘grp_only == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:220:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: throw: if ‘ext2fs_bg_checksum’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:224:41: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  222|   		fputs(")", stdout);
#  223|   		if (ext2fs_has_group_desc_csum(fs)) {
#  224|-> 			unsigned csum = ext2fs_bg_checksum(fs, i);
#  225|   			unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
#  226|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: warning[-Wanalyzer-malloc-leak]: leak of ‘block_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:175:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:180:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_false: following ‘false’ branch (when ‘grp_only == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:220:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: throw: if ‘ext2fs_group_desc_csum’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: danger: ‘block_bitmap’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  223|   		if (ext2fs_has_group_desc_csum(fs)) {
#  224|   			unsigned csum = ext2fs_bg_checksum(fs, i);
#  225|-> 			unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
#  226|   
#  227|   			printf(_(" csum 0x%04x"), csum);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: warning[-Wanalyzer-malloc-leak]: leak of ‘inode_bitmap’
e2fsprogs-1.47.3/misc/dumpe2fs.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:176:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:177:32: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/dumpe2fs.c:192:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/dumpe2fs.c:193:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:199:20: branch_false: following ‘false’ branch (when ‘grp_only == 0’)...
e2fsprogs-1.47.3/misc/dumpe2fs.c:220:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: throw: if ‘ext2fs_group_desc_csum’ throws an exception...
e2fsprogs-1.47.3/misc/dumpe2fs.c:225:45: danger: ‘inode_bitmap’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  223|   		if (ext2fs_has_group_desc_csum(fs)) {
#  224|   			unsigned csum = ext2fs_bg_checksum(fs, i);
#  225|-> 			unsigned exp_csum = ext2fs_group_desc_csum(fs, i);
#  226|   
#  227|   			printf(_(" csum 0x%04x"), csum);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def590]
e2fsprogs-1.47.3/misc/e2freefrag.c:183:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&mntpoint, 0)’
e2fsprogs-1.47.3/misc/e2freefrag.c:170:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2freefrag.c:174:14: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2freefrag.c:174:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2freefrag.c:176:14: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2freefrag.c:176:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/e2freefrag.c:177:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2freefrag.c:182:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2freefrag.c:183:12: danger: ‘open(&mntpoint, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  181|   
#  182|   	fsmap = malloc(fsmap_sizeof(FSMAP_EXTENTS));
#  183|-> 	if (!fsmap) {
#  184|   		com_err(fs->device_name, errno, "while allocating memory");
#  185|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def591]
e2fsprogs-1.47.3/misc/e2fuzz.c:50:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fsname, 2)’
e2fsprogs-1.47.3/misc/e2fuzz.c:179:12: enter_function: entry to ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:190:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:196:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:206:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:212:16: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:218:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:225:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:227:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:228:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:233:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:256:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/e2fuzz.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: call_function: calling ‘getseed’ from ‘process_fs’
#   48|   	int fd;
#   49|   
#   50|-> 	fd = open("/dev/urandom", O_RDONLY);
#   51|   	if (fd < 0) {
#   52|   		perror("open");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def592]
e2fsprogs-1.47.3/misc/e2fuzz.c:52:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fsname, 2)’
e2fsprogs-1.47.3/misc/e2fuzz.c:179:12: enter_function: entry to ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:190:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:196:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:206:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:212:16: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:218:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:225:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:227:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:228:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:233:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:256:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/e2fuzz.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: call_function: calling ‘getseed’ from ‘process_fs’
#   50|   	fd = open("/dev/urandom", O_RDONLY);
#   51|   	if (fd < 0) {
#   52|-> 		perror("open");
#   53|   		exit(0);
#   54|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def593]
e2fsprogs-1.47.3/misc/e2fuzz.c:57:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
e2fsprogs-1.47.3/misc/e2fuzz.c:179:12: enter_function: entry to ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:190:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:196:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:206:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:212:16: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:218:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:225:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:227:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:228:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:233:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: call_function: calling ‘getseed’ from ‘process_fs’
#   55|   	if (read(fd, &r, sizeof(r)) != sizeof(r))
#   56|   		printf("Unable to read random seed!\n");
#   57|-> 	close(fd);
#   58|   	return r;
#   59|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def594]
e2fsprogs-1.47.3/misc/e2fuzz.c:57:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fsname, 2)’
e2fsprogs-1.47.3/misc/e2fuzz.c:179:12: enter_function: entry to ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:190:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:196:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:206:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:212:16: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:218:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:225:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:227:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:228:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:233:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:256:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/e2fuzz.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: call_function: calling ‘getseed’ from ‘process_fs’
#   55|   	if (read(fd, &r, sizeof(r)) != sizeof(r))
#   56|   		printf("Unable to read random seed!\n");
#   57|-> 	close(fd);
#   58|   	return r;
#   59|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def595]
e2fsprogs-1.47.3/misc/e2fuzz.c:58:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fsname, 2)’
e2fsprogs-1.47.3/misc/e2fuzz.c:179:12: enter_function: entry to ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:190:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:196:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:206:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:212:16: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:212:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:218:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:225:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:227:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:228:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:233:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:256:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/e2fuzz.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: call_function: calling ‘getseed’ from ‘process_fs’
e2fsprogs-1.47.3/misc/e2fuzz.c:261:17: return_function: returning to ‘process_fs’ from ‘getseed’
e2fsprogs-1.47.3/misc/e2fuzz.c:262:33: throw: if ‘ext2fs_blocks_count’ throws an exception...
e2fsprogs-1.47.3/misc/e2fuzz.c:58:16: danger: ‘open(fsname, 2)’ leaks here; was opened at [(12)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/11)
#   56|   		printf("Unable to read random seed!\n");
#   57|   	close(fd);
#   58|-> 	return r;
#   59|   }
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
e2fsprogs-1.47.3/misc/e2undo.c:191:56: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx.blocksize)’
e2fsprogs-1.47.3/misc/e2undo.c:167:12: enter_function: entry to ‘check_filesystem’
e2fsprogs-1.47.3/misc/e2undo.c:176:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:186:33: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:186:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘check_filesystem’
e2fsprogs-1.47.3/misc/e2undo.c:191:56: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:191:18: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/misc/e2undo.c:191:56: danger: ‘malloc((long unsigned int)*ctx.blocksize)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  189|   		return retval;
#  190|   	}
#  191|-> 	retval = io_channel_read_blk64(ctx->undo_file, ctx->super_block,
#  192|   				       -SUPERBLOCK_SIZE, buf);
#  193|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
e2fsprogs-1.47.3/misc/e2undo.c:275:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/e2undo.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:262:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:264:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:265:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/e2undo.c:266:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:270:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:273:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:275:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/e2undo.c:275:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  273|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
#  274|   		retval = errno;
#  275|-> 		com_err(prg_name, retval,
#  276|   			_("while trying to delete %s"), tdb_file);
#  277|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
e2fsprogs-1.47.3/misc/e2undo.c:280:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/e2undo.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:262:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:264:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:265:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/e2undo.c:266:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:270:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:280:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/misc/e2undo.c:280:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  278|   	}
#  279|   
#  280|-> 	retval = set_undo_io_backing_manager(*io_ptr);
#  281|   	if (retval)
#  282|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
e2fsprogs-1.47.3/misc/e2undo.c:284:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/e2undo.c:257:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:262:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:264:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:265:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/e2undo.c:266:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/e2undo.c:270:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:281:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e2undo.c:283:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/e2undo.c:284:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/misc/e2undo.c:284:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  282|   		goto errout;
#  283|   	*io_ptr = undo_io_manager;
#  284|-> 	retval = set_undo_io_backup_file(tdb_file);
#  285|   	if (retval)
#  286|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-686): [#def600]
e2fsprogs-1.47.3/misc/e4crypt.c:87:9: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long unsigned int’ but received ‘void *’ for variadic argument 1 of ‘va’
e2fsprogs-1.47.3/misc/e4crypt.c:798:13: enter_function: entry to ‘do_new_session’
e2fsprogs-1.47.3/misc/e4crypt.c:803:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
e2fsprogs-1.47.3/misc/e4crypt.c:808:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:808:17: call_function: calling ‘keyctl’ from ‘do_new_session’ with 1 variadic argument
#   85|   
#   86|   	va_start(va, cmd);
#   87|-> 	arg2 = va_arg(va, unsigned long);
#   88|   	arg3 = va_arg(va, unsigned long);
#   89|   	arg4 = va_arg(va, unsigned long);

Error: COMPILER_WARNING (CWE-704): [#def601]
e2fsprogs-1.47.3/misc/e4crypt.c: scope_hint: In function ‘hex2byte’
e2fsprogs-1.47.3/misc/e4crypt.c:152:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  152 |                 h = memchr(hexchars, hex[x], hexchars_size);
#      |                   ^
#  150|   		return -EINVAL;
#  151|   	for (x = 0; x < hex_size; x += 2) {
#  152|-> 		h = memchr(hexchars, hex[x], hexchars_size);
#  153|   		if (!h)
#  154|   			return -EINVAL;

Error: COMPILER_WARNING (CWE-704): [#def602]
e2fsprogs-1.47.3/misc/e4crypt.c:152:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  150|   		return -EINVAL;
#  151|   	for (x = 0; x < hex_size; x += 2) {
#  152|-> 		h = memchr(hexchars, hex[x], hexchars_size);
#  153|   		if (!h)
#  154|   			return -EINVAL;

Error: COMPILER_WARNING (CWE-704): [#def603]
e2fsprogs-1.47.3/misc/e4crypt.c:155:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  155 |                 l = memchr(hexchars, hex[x + 1], hexchars_size);
#      |                   ^
#  153|   		if (!h)
#  154|   			return -EINVAL;
#  155|-> 		l = memchr(hexchars, hex[x + 1], hexchars_size);
#  156|   		if (!l)
#  157|   			return -EINVAL;

Error: COMPILER_WARNING (CWE-704): [#def604]
e2fsprogs-1.47.3/misc/e4crypt.c:155:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  153|   		if (!h)
#  154|   			return -EINVAL;
#  155|-> 		l = memchr(hexchars, hex[x + 1], hexchars_size);
#  156|   		if (!l)
#  157|   			return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
e2fsprogs-1.47.3/misc/e4crypt.c:270:17: warning[-Wanalyzer-malloc-leak]: leak of ‘salt_buf’
e2fsprogs-1.47.3/misc/e4crypt.c:641:13: enter_function: entry to ‘do_add_key’
e2fsprogs-1.47.3/misc/e4crypt.c:649:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
e2fsprogs-1.47.3/misc/e4crypt.c:650:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:649:16: branch_false: following ‘false’ branch (when ‘opt == -1’)...
e2fsprogs-1.47.3/misc/e4crypt.c:683:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:683:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e4crypt.c:685:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:685:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/e4crypt.c:689:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:689:9: call_function: calling ‘validate_paths’ from ‘do_add_key’
e2fsprogs-1.47.3/misc/e4crypt.c:689:9: return_function: returning to ‘do_add_key’ from ‘validate_paths’
e2fsprogs-1.47.3/misc/e4crypt.c:690:12: branch_false: following ‘false’ branch (when ‘explicit_salt == 0’)...
e2fsprogs-1.47.3/misc/e4crypt.c:691:22: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:691:34: branch_true: following ‘true’ branch (when ‘i < argc’)...
e2fsprogs-1.47.3/misc/e4crypt.c:692:40: branch_true: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:692:25: call_function: calling ‘parse_salt’ from ‘do_add_key’
#  268|   
#  269|   	if (flags & PARSE_FLAGS_FORCE_FN)
#  270|-> 		goto salt_from_filename;
#  271|   	if (strncmp(cp, "s:", 2) == 0) {
#  272|   		cp += 2;

Error: COMPILER_WARNING (CWE-704): [#def606]
e2fsprogs-1.47.3/misc/e4crypt.c: scope_hint: In function ‘parse_salt’
e2fsprogs-1.47.3/misc/e4crypt.c:312:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  312 |                         h = memchr(hexchars, *cp++, hexchars_size);
#      |                           ^
#  310|   			if (salt_len >= EXT4_MAX_SALT_SIZE)
#  311|   				goto invalid_salt;
#  312|-> 			h = memchr(hexchars, *cp++, hexchars_size);
#  313|   			l = memchr(hexchars, *cp++, hexchars_size);
#  314|   			if (!h || !l)

Error: COMPILER_WARNING (CWE-704): [#def607]
e2fsprogs-1.47.3/misc/e4crypt.c:312:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  310|   			if (salt_len >= EXT4_MAX_SALT_SIZE)
#  311|   				goto invalid_salt;
#  312|-> 			h = memchr(hexchars, *cp++, hexchars_size);
#  313|   			l = memchr(hexchars, *cp++, hexchars_size);
#  314|   			if (!h || !l)

Error: COMPILER_WARNING (CWE-704): [#def608]
e2fsprogs-1.47.3/misc/e4crypt.c:313:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  313 |                         l = memchr(hexchars, *cp++, hexchars_size);
#      |                           ^
#  311|   				goto invalid_salt;
#  312|   			h = memchr(hexchars, *cp++, hexchars_size);
#  313|-> 			l = memchr(hexchars, *cp++, hexchars_size);
#  314|   			if (!h || !l)
#  315|   				goto invalid_salt;

Error: COMPILER_WARNING (CWE-704): [#def609]
e2fsprogs-1.47.3/misc/e4crypt.c:313:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  311|   				goto invalid_salt;
#  312|   			h = memchr(hexchars, *cp++, hexchars_size);
#  313|-> 			l = memchr(hexchars, *cp++, hexchars_size);
#  314|   			if (!h || !l)
#  315|   				goto invalid_salt;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
e2fsprogs-1.47.3/misc/e4crypt.c:334:1: warning[-Wanalyzer-malloc-leak]: leak of ‘salt_buf’
e2fsprogs-1.47.3/misc/e4crypt.c:641:13: enter_function: entry to ‘do_add_key’
e2fsprogs-1.47.3/misc/e4crypt.c:649:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
e2fsprogs-1.47.3/misc/e4crypt.c:650:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:659:28: branch_false: following ‘false’ branch (when ‘explicit_salt == 0’)...
e2fsprogs-1.47.3/misc/e4crypt.c:664:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/e4crypt.c:664:25: call_function: calling ‘parse_salt’ from ‘do_add_key’
#  332|   	memcpy(salt_buf, buf, salt_len);
#  333|   	add_salt(salt_buf, salt_len);
#  334|-> }
#  335|   
#  336|   static void set_policy(struct salt *set_salt, int pad,

Error: GCC_ANALYZER_WARNING (CWE-126): [#def611]
e2fsprogs-1.47.3/misc/filefrag.c:291:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
e2fsprogs-1.47.3/misc/filefrag.c:392:12: enter_function: entry to ‘frag_report’
e2fsprogs-1.47.3/misc/filefrag.c:412:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:419:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:419:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:428:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:460:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:492:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:493:22: branch_true: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:493:22: call_function: calling ‘filefrag_fiemap’ from ‘frag_report’
#  289|   		}
#  290|   
#  291|-> 		fiemap->fm_start = (fm_ext[i - 1].fe_logical +
#  292|   				    fm_ext[i - 1].fe_length);
#  293|   	} while (last == 0);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def612]
e2fsprogs-1.47.3/misc/filefrag.c:292:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
e2fsprogs-1.47.3/misc/filefrag.c:392:12: enter_function: entry to ‘frag_report’
e2fsprogs-1.47.3/misc/filefrag.c:412:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:419:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:419:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:428:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:441:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:460:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:492:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/filefrag.c:493:22: branch_true: ...to here
e2fsprogs-1.47.3/misc/filefrag.c:493:22: call_function: calling ‘filefrag_fiemap’ from ‘frag_report’
#  290|   
#  291|   		fiemap->fm_start = (fm_ext[i - 1].fe_logical +
#  292|-> 				    fm_ext[i - 1].fe_length);
#  293|   	} while (last == 0);
#  294|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
e2fsprogs-1.47.3/misc/fuse2fs.c:552:9: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_path’
e2fsprogs-1.47.3/misc/fuse2fs.c:3228:12: enter_function: entry to ‘op_create’
e2fsprogs-1.47.3/misc/fuse2fs.c:3241:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:3242:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3244:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/fuse2fs.c:3245:12: branch_false: following ‘false’ branch (when ‘temp_path’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3249:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3250:12: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3254:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3259:14: call_function: calling ‘fs_can_allocate’ from ‘op_create’
#  550|   	blk64_t reserved;
#  551|   
#  552|-> 	dbg_printf(ff, "%s: Asking for %llu; alloc_all=%d total=%llu free=%llu "
#  553|   		   "rsvd=%llu\n", __func__, num, ff->alloc_all_blocks,
#  554|   		   ext2fs_blocks_count(fs->super),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def614]
e2fsprogs-1.47.3/misc/fuse2fs.c:557:19: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_path’
e2fsprogs-1.47.3/misc/fuse2fs.c:3228:12: enter_function: entry to ‘op_create’
e2fsprogs-1.47.3/misc/fuse2fs.c:3241:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:3242:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3244:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/fuse2fs.c:3245:12: branch_false: following ‘false’ branch (when ‘temp_path’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3249:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3250:12: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3254:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3259:14: call_function: calling ‘fs_can_allocate’ from ‘op_create’
#  555|   		   ext2fs_free_blocks_count(fs->super),
#  556|   		   ext2fs_r_blocks_count(fs->super));
#  557|-> 	if (num > ext2fs_blocks_count(fs->super))
#  558|   		return 0;
#  559|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def615]
e2fsprogs-1.47.3/misc/fuse2fs.c:568:20: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_path’
e2fsprogs-1.47.3/misc/fuse2fs.c:3228:12: enter_function: entry to ‘op_create’
e2fsprogs-1.47.3/misc/fuse2fs.c:3241:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:3242:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3244:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/fuse2fs.c:3245:12: branch_false: following ‘false’ branch (when ‘temp_path’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3249:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3250:12: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3254:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3259:14: call_function: calling ‘fs_can_allocate’ from ‘op_create’
#  566|   	 * by refusing to allocate any of the reserve blocks to anybody.
#  567|   	 */
#  568|-> 	reserved = ext2fs_r_blocks_count(fs->super);
#  569|   	if (reserved == 0)
#  570|   		reserved = ext2fs_blocks_count(fs->super) / 10;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def616]
e2fsprogs-1.47.3/misc/fuse2fs.c:570:28: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_path’
e2fsprogs-1.47.3/misc/fuse2fs.c:3228:12: enter_function: entry to ‘op_create’
e2fsprogs-1.47.3/misc/fuse2fs.c:3241:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:3242:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3244:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/fuse2fs.c:3245:12: branch_false: following ‘false’ branch (when ‘temp_path’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3249:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3250:12: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3254:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3259:14: call_function: calling ‘fs_can_allocate’ from ‘op_create’
#  568|   	reserved = ext2fs_r_blocks_count(fs->super);
#  569|   	if (reserved == 0)
#  570|-> 		reserved = ext2fs_blocks_count(fs->super) / 10;
#  571|   	return ext2fs_free_blocks_count(fs->super) > reserved + num;
#  572|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def617]
e2fsprogs-1.47.3/misc/fuse2fs.c:571:16: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_path’
e2fsprogs-1.47.3/misc/fuse2fs.c:3228:12: enter_function: entry to ‘op_create’
e2fsprogs-1.47.3/misc/fuse2fs.c:3241:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:3242:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3244:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/fuse2fs.c:3245:12: branch_false: following ‘false’ branch (when ‘temp_path’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3249:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3250:12: branch_false: following ‘false’ branch (when ‘node_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/fuse2fs.c:3254:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:3259:14: call_function: calling ‘fs_can_allocate’ from ‘op_create’
#  569|   	if (reserved == 0)
#  570|   		reserved = ext2fs_blocks_count(fs->super) / 10;
#  571|-> 	return ext2fs_free_blocks_count(fs->super) > reserved + num;
#  572|   }
#  573|   

Error: CPPCHECK_WARNING (CWE-476): [#def618]
e2fsprogs-1.47.3/misc/fuse2fs.c:1323: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: filename
# 1321|   	int ret;
# 1322|   
# 1323|-> 	base_name = strrchr(filename, '/');
# 1324|   	if (base_name) {
# 1325|   		*base_name++ = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def619]
e2fsprogs-1.47.3/misc/fuse2fs.c:3967:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/fuse2fs.c:4022:12: enter_function: entry to ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4035:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4036:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4037:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4038:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4042:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4046:17: call_function: inlined call to ‘FUSE2FS_B_TO_FSB’ from ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4052:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4056:13: call_function: inlined call to ‘FUSE2FS_B_TO_FSBT’ from ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4056:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4057:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4057:23: call_function: calling ‘clean_block_middle’ from ‘punch_helper’
# 3965|   	}
# 3966|   
# 3967|-> 	err = ext2fs_bmap2(fs, ino, EXT2_INODE(inode), *buf, 0,
# 3968|   			   FUSE2FS_B_TO_FSBT(ff, offset), &retflags, &blk);
# 3969|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
e2fsprogs-1.47.3/misc/fuse2fs.c:4003:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/fuse2fs.c:4022:12: enter_function: entry to ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4035:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4036:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4037:9: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4038:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4042:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4046:17: call_function: inlined call to ‘FUSE2FS_B_TO_FSB’ from ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4052:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4056:13: call_function: inlined call to ‘FUSE2FS_B_TO_FSBT’ from ‘punch_helper’
e2fsprogs-1.47.3/misc/fuse2fs.c:4056:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4060:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4060:23: call_function: calling ‘clean_block_edge’ from ‘punch_helper’
# 4001|   	}
# 4002|   
# 4003|-> 	err = ext2fs_bmap2(fs, ino, EXT2_INODE(inode), *buf, 0,
# 4004|   			   FUSE2FS_B_TO_FSBT(ff, offset), &retflags, &blk);
# 4005|   	if (err)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def621]
e2fsprogs-1.47.3/misc/fuse2fs.c:4206:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
e2fsprogs-1.47.3/misc/fuse2fs.c:4198:14: acquire_resource: opened here
e2fsprogs-1.47.3/misc/fuse2fs.c:4199:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/fuse2fs.c:4204:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/fuse2fs.c:4206:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 4204|   	r = read(fd, p, sz);
# 4205|   
# 4206|-> 	close(fd);
# 4207|   	return (size_t) r == sz;
# 4208|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def622]
e2fsprogs-1.47.3/misc/lsattr.c:85:13: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   83|   	unsigned long project;
#   84|   
#   85|-> 	if (fgetflags (name, &flags) == -1) {
#   86|   		com_err (program_name, errno, _("While reading flags on %s"),
#   87|   			 name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def623]
e2fsprogs-1.47.3/misc/lsattr.c:86:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   84|   
#   85|   	if (fgetflags (name, &flags) == -1) {
#   86|-> 		com_err (program_name, errno, _("While reading flags on %s"),
#   87|   			 name);
#   88|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
e2fsprogs-1.47.3/misc/lsattr.c:91:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   89|   	}
#   90|   	if (project_opt) {
#   91|-> 		if (fgetproject(name, &project) == -1) {
#   92|   			com_err (program_name, errno,
#   93|   				 _("While reading project on %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def625]
e2fsprogs-1.47.3/misc/lsattr.c:92:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   90|   	if (project_opt) {
#   91|   		if (fgetproject(name, &project) == -1) {
#   92|-> 			com_err (program_name, errno,
#   93|   				 _("While reading project on %s"),
#   94|   				 name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def626]
e2fsprogs-1.47.3/misc/lsattr.c:100:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   98|   	}
#   99|   	if (generation_opt) {
#  100|-> 		if (fgetversion (name, &generation) == -1) {
#  101|   			com_err (program_name, errno,
#  102|   				 _("While reading version on %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def627]
e2fsprogs-1.47.3/misc/lsattr.c:101:25: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#   99|   	if (generation_opt) {
#  100|   		if (fgetversion (name, &generation) == -1) {
#  101|-> 			com_err (program_name, errno,
#  102|   				 _("While reading version on %s"),
#  103|   				 name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def628]
e2fsprogs-1.47.3/misc/lsattr.c:110:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#  108|   	if (pf_options & PFOPT_LONG) {
#  109|   		printf("%-28s ", name);
#  110|-> 		print_flags(stdout, flags, pf_options);
#  111|   		fputc('\n', stdout);
#  112|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def629]
e2fsprogs-1.47.3/misc/lsattr.c:113:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:139:12: enter_function: entry to ‘lsattr_dir_proc’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:164:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:165:25: call_function: calling ‘list_attributes’ from ‘lsattr_dir_proc’
#  111|   		fputc('\n', stdout);
#  112|   	} else {
#  113|-> 		print_flags(stdout, flags, pf_options);
#  114|   		printf(" %s\n", name);
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
e2fsprogs-1.47.3/misc/lsattr.c:162:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
e2fsprogs-1.47.3/misc/lsattr.c:146:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:150:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:150:16: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/lsattr.c:151:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
e2fsprogs-1.47.3/misc/lsattr.c:157:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:161:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/lsattr.c:162:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/lsattr.c:162:17: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/misc/lsattr.c:162:17: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  160|   		sprintf (path, "%s/%s", dir_name, de->d_name);
#  161|   	if (LSTAT (path, &st) == -1)
#  162|-> 		perror (path);
#  163|   	else {
#  164|   		if (de->d_name[0] != '.' || all) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_false: following ‘false’ branch (when ‘next’ is NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: throw: if ‘ext2fs_new_inode’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  111|   			*next++ = 0;
#  112|   		if (*cp) {
#  113|-> 			retval = ext2fs_new_inode(fs, ino, LINUX_S_IFDIR,
#  114|   						  NULL, &newdir);
#  115|   			if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fn’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_true: following ‘true’ branch (when ‘next’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:111:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:119:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:122:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:124:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:127:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:132:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:135:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:135:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_true: following ‘true’ branch (when ‘next’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:111:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: throw: if ‘ext2fs_new_inode’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: danger: ‘fn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  111|   			*next++ = 0;
#  112|   		if (*cp) {
#  113|-> 			retval = ext2fs_new_inode(fs, ino, LINUX_S_IFDIR,
#  114|   						  NULL, &newdir);
#  115|   			if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_false: following ‘false’ branch (when ‘next’ is NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: throw: if ‘ext2fs_mkdir’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  116|   				goto errout;
#  117|   
#  118|-> 			retval = ext2fs_mkdir(fs, ino, newdir, cp);
#  119|   			if (retval)
#  120|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def634]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fn’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_true: following ‘true’ branch (when ‘next’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:111:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:119:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:122:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:124:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:127:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:132:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:135:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:135:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_true: following ‘true’ branch (when ‘next’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:111:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: throw: if ‘ext2fs_mkdir’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: danger: ‘fn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  116|   				goto errout;
#  117|   
#  118|-> 			retval = ext2fs_mkdir(fs, ino, newdir, cp);
#  119|   			if (retval)
#  120|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def635]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:123:34: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_false: following ‘false’ branch (when ‘next’ is NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:119:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:122:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:123:34: throw: if ‘ext2fs_read_inode’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:123:34: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  121|   
#  122|   			ino = newdir;
#  123|-> 			retval = ext2fs_read_inode(fs, ino, &inode);
#  124|   			if (retval)
#  125|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:123:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fn’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:359:11: enter_function: entry to ‘mk_hugefiles’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:369:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:372:14: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:372:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:375:15: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:405:18: call_function: calling ‘create_directory’ from ‘mk_hugefiles’
#  121|   
#  122|   			ino = newdir;
#  123|-> 			retval = ext2fs_read_inode(fs, ino, &inode);
#  124|   			if (retval)
#  125|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def637]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:131:34: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:102:14: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:103:12: branch_false: following ‘false’ branch (when ‘fn’ is non-NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:106:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:110:20: branch_false: following ‘false’ branch (when ‘next’ is NULL)...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:112:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:113:34: branch_true: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:115:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:118:34: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:119:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:122:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:124:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:127:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:131:34: throw: if ‘ext2fs_write_inode’ throws an exception...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:131:34: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  129|   			inode.i_gid = gid & 0xFFFF;
#  130|   			ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff);
#  131|-> 			retval = ext2fs_write_inode(fs, ino, &inode);
#  132|   			if (retval)
#  133|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def638]
e2fsprogs-1.47.3/misc/mk_hugefiles.c:131:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fn’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:359:11: enter_function: entry to ‘mk_hugefiles’
e2fsprogs-1.47.3/misc/mk_hugefiles.c:369:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:372:14: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:372:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mk_hugefiles.c:375:15: branch_false: ...to here
e2fsprogs-1.47.3/misc/mk_hugefiles.c:405:18: call_function: calling ‘create_directory’ from ‘mk_hugefiles’
#  129|   			inode.i_gid = gid & 0xFFFF;
#  130|   			ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff);
#  131|-> 			retval = ext2fs_write_inode(fs, ino, &inode);
#  132|   			if (retval)
#  133|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def639]
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(bad_blocks_file, "r")’
e2fsprogs-1.47.3/misc/mke2fs.c:219:13: acquire_resource: opened here
e2fsprogs-1.47.3/misc/mke2fs.c:220:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: throw: if ‘ext2fs_read_bb_FILE’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: danger: ‘fopen(bad_blocks_file, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  223|   		exit(1);
#  224|   	}
#  225|-> 	retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
#  226|   	fclose (f);
#  227|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(bad_blocks_file, "r")’
e2fsprogs-1.47.3/misc/mke2fs.c:219:13: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:220:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: throw: if ‘ext2fs_read_bb_FILE’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:225:18: danger: ‘fopen(bad_blocks_file, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  223|   		exit(1);
#  224|   	}
#  225|-> 	retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
#  226|   	fclose (f);
#  227|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
e2fsprogs-1.47.3/misc/mke2fs.c:255:18: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&buf, "r")’
e2fsprogs-1.47.3/misc/mke2fs.c:249:13: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:250:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:255:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:255:18: throw: if ‘ext2fs_read_bb_FILE’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:255:18: danger: ‘popen(&buf, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  253|   		exit(1);
#  254|   	}
#  255|-> 	retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
#  256|   	pclose(f);
#  257|   	if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
e2fsprogs-1.47.3/misc/mke2fs.c:351:26: warning[-Wanalyzer-malloc-leak]: leak of ‘inode’
e2fsprogs-1.47.3/misc/mke2fs.c:338:13: enter_function: entry to ‘write_reserved_inodes’
e2fsprogs-1.47.3/misc/mke2fs.c:344:18: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:344:37: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:344:18: call_function: calling ‘ext2fs_get_memzero’ from ‘write_reserved_inodes’
e2fsprogs-1.47.3/misc/mke2fs.c:344:18: return_function: returning to ‘write_reserved_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/mke2fs.c:345:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:345:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:350:29: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:351:26: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:352:50: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:351:26: throw: if ‘ext2fs_write_inode_full’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:351:26: danger: ‘inode’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  349|   
#  350|   	for (ino = 1; ino < EXT2_FIRST_INO(fs->super); ino++) {
#  351|-> 		retval = ext2fs_write_inode_full(fs, ino, inode,
#  352|   						 EXT2_INODE_SIZE(fs->super));
#  353|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def643]
e2fsprogs-1.47.3/misc/mke2fs.c:601:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:592:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:593:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_true: following ‘true’ branch (when ‘sect == 0’)...
e2fsprogs-1.47.3/misc/mke2fs.c:601:26: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:601:26: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:601:26: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  599|   	if (sect == 0) {
#  600|   		/* Check for a BSD disklabel, and don't erase it if so */
#  601|-> 		retval = io_channel_read_blk64(fs->io, 0, -512, buf);
#  602|   		if (retval)
#  603|   			fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
e2fsprogs-1.47.3/misc/mke2fs.c:617:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:592:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:593:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: following ‘false’ branch (when ‘sect != 0’)...
e2fsprogs-1.47.3/misc/mke2fs.c:616:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:617:9: throw: if the called function throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:617:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  615|   
#  616|   	memset(buf, 0, 512*nsect);
#  617|-> 	io_channel_set_blksize(fs->io, 512);
#  618|   	retval = io_channel_write_blk64(fs->io, sect, -512*nsect, buf);
#  619|   	io_channel_set_blksize(fs->io, fs->blocksize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def645]
e2fsprogs-1.47.3/misc/mke2fs.c:618:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:592:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:593:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: following ‘false’ branch (when ‘sect != 0’)...
e2fsprogs-1.47.3/misc/mke2fs.c:616:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:618:18: throw: if ‘io_channel_write_blk64’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:618:18: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  616|   	memset(buf, 0, 512*nsect);
#  617|   	io_channel_set_blksize(fs->io, 512);
#  618|-> 	retval = io_channel_write_blk64(fs->io, sect, -512*nsect, buf);
#  619|   	io_channel_set_blksize(fs->io, fs->blocksize);
#  620|   	free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def646]
e2fsprogs-1.47.3/misc/mke2fs.c:619:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:592:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:593:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:599:12: branch_false: following ‘false’ branch (when ‘sect != 0’)...
e2fsprogs-1.47.3/misc/mke2fs.c:616:24: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:619:9: throw: if the called function throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:619:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  617|   	io_channel_set_blksize(fs->io, 512);
#  618|   	retval = io_channel_write_blk64(fs->io, sect, -512*nsect, buf);
#  619|-> 	io_channel_set_blksize(fs->io, fs->blocksize);
#  620|   	free(buf);
#  621|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:828:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:829:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:834:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:849:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:851:41: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:848:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:878:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:878:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:891:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:891:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:904:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:904:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:918:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:918:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:921:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:921:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:936:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:936:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:943:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:943:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:958:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:972:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:972:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1029:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1029:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1047:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1047:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1049:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1049:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1054:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1054:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1059:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1059:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1065:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1065:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1088:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1088:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1092:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1092:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1094:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1094:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1096:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1097:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1099:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1104:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: throw: if ‘parse_quota_types’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1103|   			}
# 1104|   			quotatype_bits = 0;
# 1105|-> 			ret = parse_quota_types(arg, &quotatype_bits, &errtok);
# 1106|   			if (ret) {
# 1107|   				if (errtok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def648]
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/mke2fs.c:828:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:829:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:834:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:848:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:878:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:878:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:891:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:891:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:904:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:904:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:918:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:918:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:921:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:921:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:936:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:936:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:943:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:943:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:958:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:972:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:972:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1029:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1029:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1047:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1047:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1049:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1049:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1054:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1054:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1059:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1059:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1065:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1065:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1088:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1088:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1092:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1092:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1094:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1094:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1096:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1097:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1099:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1104:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: throw: if ‘parse_quota_types’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1105:31: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1103|   			}
# 1104|   			quotatype_bits = 0;
# 1105|-> 			ret = parse_quota_types(arg, &quotatype_bits, &errtok);
# 1106|   			if (ret) {
# 1107|   				if (errtok) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
e2fsprogs-1.47.3/misc/mke2fs.c:828:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:829:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:834:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:849:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:851:41: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:848:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:878:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:878:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:891:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:891:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:904:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:904:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:918:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:918:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:921:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:921:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:936:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:936:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:943:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:943:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:958:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:972:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:972:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1029:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1029:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1047:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1047:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1049:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1049:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1054:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1054:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1059:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1059:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1065:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1065:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1088:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1088:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1092:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1092:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1094:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1094:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1096:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1097:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1099:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1104:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1106:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1107:37: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1107:36: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 1110|   					free(errtok);
# 1111|   				} else
# 1112|-> 					com_err(program_name, ret,
# 1113|   						"while parsing quota type");
# 1114|   				r_usage++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def650]
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/mke2fs.c:828:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:829:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:834:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:848:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:878:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:878:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:891:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:891:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:904:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:904:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:918:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:918:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:921:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:921:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:936:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:936:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:943:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:943:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:958:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:972:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:972:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1029:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1029:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1047:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1047:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1049:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1049:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1054:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1054:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1059:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1059:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1065:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1065:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1088:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1088:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1092:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1092:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1094:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1094:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1096:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1097:31: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1099:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1104:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1106:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1107:37: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1107:36: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1112:41: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 1110|   					free(errtok);
# 1111|   				} else
# 1112|-> 					com_err(program_name, ret,
# 1113|   						"while parsing quota type");
# 1114|   				r_usage++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def651]
e2fsprogs-1.47.3/misc/mke2fs.c:1126:36: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/mke2fs.c:828:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:829:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:834:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:835:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:838:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:839:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:843:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:844:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:848:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:847:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:878:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:878:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:891:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:891:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:904:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:904:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:918:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:918:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:921:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:921:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:936:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:936:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:943:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:943:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:958:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:957:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:972:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:972:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1029:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1029:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1047:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1047:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1049:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1049:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1054:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1054:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1059:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1059:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1065:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1065:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1088:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1088:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1092:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1092:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1094:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1094:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1096:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1096:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1118:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1118:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1120:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1120:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1121:28: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1121:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1126:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1126:36: throw: if ‘e2p_str2encoding’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1126:36: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1124|   			}
# 1125|   
# 1126|-> 			encoding = e2p_str2encoding(arg);
# 1127|   			if (encoding < 0) {
# 1128|   				fprintf(stderr, _("Invalid encoding: %s"), arg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def652]
e2fsprogs-1.47.3/misc/mke2fs.c:1354:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1449:12: branch_false: following ‘false’ branch (when ‘parse_str’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1454:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: call_function: calling ‘push_string’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: return_function: returning to ‘parse_fs_type’ from ‘push_string’
e2fsprogs-1.47.3/misc/mke2fs.c:1461:20: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1462:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1464:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1352|   	names[2] = 0;
# 1353|   
# 1354|-> 	if (profile_iterator_create(prof, names,
# 1355|   				    PROFILE_ITER_LIST_SECTION |
# 1356|   				    PROFILE_ITER_RELATIONS_ONLY, &state))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def653]
e2fsprogs-1.47.3/misc/mke2fs.c:1354:13: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1448:21: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:1449:12: branch_false: following ‘false’ branch (when ‘parse_str’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1454:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: call_function: calling ‘push_string’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: return_function: returning to ‘parse_fs_type’ from ‘push_string’
e2fsprogs-1.47.3/misc/mke2fs.c:1461:20: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1462:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1464:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1352|   	names[2] = 0;
# 1353|   
# 1354|-> 	if (profile_iterator_create(prof, names,
# 1355|   				    PROFILE_ITER_LIST_SECTION |
# 1356|   				    PROFILE_ITER_RELATIONS_ONLY, &state))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def654]
e2fsprogs-1.47.3/misc/mke2fs.c:1354:13: warning[-Wanalyzer-malloc-leak]: leak of ‘list.list’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1418:14: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1352|   	names[2] = 0;
# 1353|   
# 1354|-> 	if (profile_iterator_create(prof, names,
# 1355|   				    PROFILE_ITER_LIST_SECTION |
# 1356|   				    PROFILE_ITER_RELATIONS_ONLY, &state))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def655]
e2fsprogs-1.47.3/misc/mke2fs.c:1359:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1449:12: branch_false: following ‘false’ branch (when ‘parse_str’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1454:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: call_function: calling ‘push_string’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: return_function: returning to ‘parse_fs_type’ from ‘push_string’
e2fsprogs-1.47.3/misc/mke2fs.c:1461:20: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1462:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1464:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1357|   		return 0;
# 1358|   
# 1359|-> 	if ((profile_iterator(&state, &name, 0) == 0) && name) {
# 1360|   		free(name);
# 1361|   		ret = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def656]
e2fsprogs-1.47.3/misc/mke2fs.c:1359:14: warning[-Wanalyzer-malloc-leak]: leak of ‘list.list’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1418:14: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1357|   		return 0;
# 1358|   
# 1359|-> 	if ((profile_iterator(&state, &name, 0) == 0) && name) {
# 1360|   		free(name);
# 1361|   		ret = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def657]
e2fsprogs-1.47.3/misc/mke2fs.c:1364:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1449:12: branch_false: following ‘false’ branch (when ‘parse_str’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1454:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: call_function: calling ‘push_string’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1457:17: return_function: returning to ‘parse_fs_type’ from ‘push_string’
e2fsprogs-1.47.3/misc/mke2fs.c:1461:20: branch_true: following ‘true’ branch (when ‘t’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1462:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1464:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: branch_true: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1465:29: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1362|   	}
# 1363|   
# 1364|-> 	profile_iterator_free(&state);
# 1365|   	return ret;
# 1366|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def658]
e2fsprogs-1.47.3/misc/mke2fs.c:1364:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list.list’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1418:14: call_function: calling ‘profile_has_subsection’ from ‘parse_fs_type’
# 1362|   	}
# 1363|   
# 1364|-> 	profile_iterator_free(&state);
# 1365|   	return ret;
# 1366|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def659]
e2fsprogs-1.47.3/misc/mke2fs.c:1410:17: warning[-Wanalyzer-malloc-leak]: leak of ‘list.list’
e2fsprogs-1.47.3/misc/mke2fs.c:1368:15: enter_function: entry to ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: call_function: calling ‘init_list’ from ‘parse_fs_type’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:13: return_function: returning to ‘parse_fs_type’ from ‘init_list’
e2fsprogs-1.47.3/misc/mke2fs.c:1383:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1386:12: branch_false: following ‘false’ branch (when ‘fs_type’ is NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:1388:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1388:17: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:1390:19: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1390:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1392:19: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1392:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/mke2fs.c:1394:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:1410:17: throw: if ‘profile_get_string’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:1410:17: danger: ‘list.list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/3)
# 1408|   
# 1409|   	if (!ext_type) {
# 1410|-> 		profile_get_string(profile, "defaults", "fs_type", 0,
# 1411|   				   "ext2", &profile_type);
# 1412|   		ext_type = profile_type;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
e2fsprogs-1.47.3/misc/mke2fs.c:2964:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/mke2fs.c:2943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:2951:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2953:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2954:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:2955:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2959:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2962:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:2964:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:2964:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
# 2962|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
# 2963|   		retval = errno;
# 2964|-> 		com_err(program_name, retval,
# 2965|   			_("while trying to delete %s"), tdb_file);
# 2966|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
e2fsprogs-1.47.3/misc/mke2fs.c:2969:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/mke2fs.c:2943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:2951:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2953:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2954:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:2955:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2959:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2969:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:2969:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
# 2967|   	}
# 2968|   
# 2969|-> 	retval = set_undo_io_backing_manager(*io_ptr);
# 2970|   	if (retval)
# 2971|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
e2fsprogs-1.47.3/misc/mke2fs.c:2973:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/mke2fs.c:2943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:2951:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2953:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2954:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/mke2fs.c:2955:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/mke2fs.c:2959:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2970:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mke2fs.c:2972:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mke2fs.c:2973:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/misc/mke2fs.c:2973:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
# 2971|   		goto errout;
# 2972|   	*io_ptr = undo_io_manager;
# 2973|-> 	retval = set_undo_io_backup_file(tdb_file);
# 2974|   	if (retval)
# 2975|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def663]
e2fsprogs-1.47.3/misc/mklost+found.c:61:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
e2fsprogs-1.47.3/misc/mklost+found.c:48:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
e2fsprogs-1.47.3/misc/mklost+found.c:53:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:53:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:59:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:61:17: danger: out-of-bounds write from byte 257 till byte 502 but ‘name’ ends at byte 257
#   59|   	memset (name, 'x', 246);
#   60|   	do {
#   61|-> 		sprintf (name + 246, "%08d", i);
#   62|   		strcpy (path, LPF);
#   63|   		strcat (path, "/");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def664]
e2fsprogs-1.47.3/misc/mklost+found.c:70:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(&path, 420)’
e2fsprogs-1.47.3/misc/mklost+found.c:48:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
e2fsprogs-1.47.3/misc/mklost+found.c:53:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:53:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:59:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:65:26: acquire_resource: opened here
e2fsprogs-1.47.3/misc/mklost+found.c:65:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:69:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:70:17: danger: ‘creat(&path, 420)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   68|   		}
#   69|   		i++;
#   70|-> 		close (d);
#   71|   		if (stat (LPF, &st) == -1) {
#   72|   			perror ("stat");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def665]
e2fsprogs-1.47.3/misc/mklost+found.c:77:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
e2fsprogs-1.47.3/misc/mklost+found.c:48:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
e2fsprogs-1.47.3/misc/mklost+found.c:53:13: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:53:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:59:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:65:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:69:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:71:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/mklost+found.c:75:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:76:21: branch_true: following ‘true’ branch (when ‘j < i’)...
e2fsprogs-1.47.3/misc/mklost+found.c:77:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/mklost+found.c:77:17: danger: out-of-bounds write from byte 257 till byte 502 but ‘name’ ends at byte 257
#   75|   	} while (st.st_size <= (EXT2_NDIR_BLOCKS - 1) * st.st_blksize);
#   76|   	for (j = 0; j < i; j++) {
#   77|-> 		sprintf (name + 246, "%08d", j);
#   78|   		strcpy (path, LPF);
#   79|   		strcat (path, "/");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
e2fsprogs-1.47.3/misc/tune2fs.c:712:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.buf’
e2fsprogs-1.47.3/misc/tune2fs.c:698:18: enter_function: entry to ‘rewrite_directory’
e2fsprogs-1.47.3/misc/tune2fs.c:704:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_directory’
e2fsprogs-1.47.3/misc/tune2fs.c:712:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:712:18: danger: ‘ctx.buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  710|   	ctx.dir = dir;
#  711|   	ctx.errcode = 0;
#  712|-> 	retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_READ_ONLY |
#  713|   						BLOCK_FLAG_DATA_ONLY,
#  714|   				       0, rewrite_dir_block, &ctx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def667]
e2fsprogs-1.47.3/misc/tune2fs.c:754:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  752|   	__u32 hash;
#  753|   
#  754|-> 	retval = ext2fs_file_open(ctx->fs, ino, 0, &file);
#  755|   	if (retval)
#  756|   		fatal_err(retval, "open ea_inode");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def668]
e2fsprogs-1.47.3/misc/tune2fs.c:754:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  752|   	__u32 hash;
#  753|   
#  754|-> 	retval = ext2fs_file_open(ctx->fs, ino, 0, &file);
#  755|   	if (retval)
#  756|   		fatal_err(retval, "open ea_inode");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def669]
e2fsprogs-1.47.3/misc/tune2fs.c:756:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  754|   	retval = ext2fs_file_open(ctx->fs, ino, 0, &file);
#  755|   	if (retval)
#  756|-> 		fatal_err(retval, "open ea_inode");
#  757|   	retval = ext2fs_file_read(file, ctx->ea_buf, inode->i_size,
#  758|   				  NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
e2fsprogs-1.47.3/misc/tune2fs.c:756:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  754|   	retval = ext2fs_file_open(ctx->fs, ino, 0, &file);
#  755|   	if (retval)
#  756|-> 		fatal_err(retval, "open ea_inode");
#  757|   	retval = ext2fs_file_read(file, ctx->ea_buf, inode->i_size,
#  758|   				  NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
e2fsprogs-1.47.3/misc/tune2fs.c:757:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  755|   	if (retval)
#  756|   		fatal_err(retval, "open ea_inode");
#  757|-> 	retval = ext2fs_file_read(file, ctx->ea_buf, inode->i_size,
#  758|   				  NULL);
#  759|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def672]
e2fsprogs-1.47.3/misc/tune2fs.c:757:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  755|   	if (retval)
#  756|   		fatal_err(retval, "open ea_inode");
#  757|-> 	retval = ext2fs_file_read(file, ctx->ea_buf, inode->i_size,
#  758|   				  NULL);
#  759|   	if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def673]
e2fsprogs-1.47.3/misc/tune2fs.c:896:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  894|   	retval = ext2fs_get_mem(ctx->inode_size, &inode);
#  895|   	if (retval)
#  896|-> 		fatal_err(retval, "while allocating memory");
#  897|   
#  898|   	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def674]
e2fsprogs-1.47.3/misc/tune2fs.c:896:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  894|   	retval = ext2fs_get_mem(ctx->inode_size, &inode);
#  895|   	if (retval)
#  896|-> 		fatal_err(retval, "while allocating memory");
#  897|   
#  898|   	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def675]
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  896|   		fatal_err(retval, "while allocating memory");
#  897|   
#  898|-> 	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
#  899|   	if (retval)
#  900|   		fatal_err(retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def676]
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  896|   		fatal_err(retval, "while allocating memory");
#  897|   
#  898|-> 	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
#  899|   	if (retval)
#  900|   		fatal_err(retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def677]
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*ctx.inode_size)’
e2fsprogs-1.47.3/misc/tune2fs.c:886:13: enter_function: entry to ‘rewrite_inodes_pass’
e2fsprogs-1.47.3/misc/tune2fs.c:894:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes_pass’
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:898:18: danger: ‘malloc((long unsigned int)*ctx.inode_size)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  896|   		fatal_err(retval, "while allocating memory");
#  897|   
#  898|-> 	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
#  899|   	if (retval)
#  900|   		fatal_err(retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def678]
e2fsprogs-1.47.3/misc/tune2fs.c:900:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  898|   	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
#  899|   	if (retval)
#  900|-> 		fatal_err(retval, "while opening inode scan");
#  901|   
#  902|   	do {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def679]
e2fsprogs-1.47.3/misc/tune2fs.c:900:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  898|   	retval = ext2fs_open_inode_scan(ctx->fs, 0, &scan);
#  899|   	if (retval)
#  900|-> 		fatal_err(retval, "while opening inode scan");
#  901|   
#  902|   	do {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def680]
e2fsprogs-1.47.3/misc/tune2fs.c:903:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  901|   
#  902|   	do {
#  903|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode,
#  904|   						    ctx->inode_size);
#  905|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def681]
e2fsprogs-1.47.3/misc/tune2fs.c:903:26: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:960:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:961:17: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  901|   
#  902|   	do {
#  903|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode,
#  904|   						    ctx->inode_size);
#  905|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def682]
e2fsprogs-1.47.3/misc/tune2fs.c:906:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.ea_buf’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:963:9: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  904|   						    ctx->inode_size);
#  905|   		if (retval)
#  906|-> 			fatal_err(retval, "while getting next inode");
#  907|   		if (!ino)
#  908|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def683]
e2fsprogs-1.47.3/misc/tune2fs.c:906:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:963:9: call_function: calling ‘rewrite_inodes_pass’ from ‘rewrite_inodes’
#  904|   						    ctx->inode_size);
#  905|   		if (retval)
#  906|-> 			fatal_err(retval, "while getting next inode");
#  907|   		if (!ino)
#  908|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def684]
e2fsprogs-1.47.3/misc/tune2fs.c:948:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.zero_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:931:13: enter_function: entry to ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:935:31: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:933:32: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:939:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: call_function: calling ‘ext2fs_get_memzero’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:942:18: return_function: returning to ‘rewrite_inodes’ from ‘ext2fs_get_memzero’
e2fsprogs-1.47.3/misc/tune2fs.c:943:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:946:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘rewrite_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:948:17: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:948:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:948:17: danger: ‘ctx.zero_inode’ leaks here; was allocated at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
#  946|   	retval = ext2fs_get_mem(64 * 1024, &ctx.ea_buf);
#  947|   	if (retval)
#  948|-> 		fatal_err(retval, "while allocating memory");
#  949|   
#  950|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def685]
e2fsprogs-1.47.3/misc/tune2fs.c:1028:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)length)’
e2fsprogs-1.47.3/misc/tune2fs.c:1011:18: enter_function: entry to ‘zero_empty_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:1013:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1019:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1020:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1023:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1023:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘zero_empty_inodes’
e2fsprogs-1.47.3/misc/tune2fs.c:1028:26: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:1028:26: danger: ‘malloc((long unsigned int)length)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
# 1026|   
# 1027|   	do {
# 1028|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
# 1029|   		if (retval)
# 1030|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def686]
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)length)’
e2fsprogs-1.47.3/misc/tune2fs.c:1048:12: enter_function: entry to ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1050:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: danger: ‘malloc((long unsigned int)length)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
# 1059|   		fatal_err(retval, "while allocating memory");
# 1060|   
# 1061|-> 	retval = ext2fs_open_inode_scan(fs, 0, &scan);
# 1062|   	if (retval)
# 1063|   		fatal_err(retval, "while opening inode scan");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def687]
e2fsprogs-1.47.3/misc/tune2fs.c:1062:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)length)’
e2fsprogs-1.47.3/misc/tune2fs.c:1048:12: enter_function: entry to ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1050:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1062:12: danger: ‘malloc((long unsigned int)length)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
# 1060|   
# 1061|   	retval = ext2fs_open_inode_scan(fs, 0, &scan);
# 1062|-> 	if (retval)
# 1063|   		fatal_err(retval, "while opening inode scan");
# 1064|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def688]
e2fsprogs-1.47.3/misc/tune2fs.c:1066:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)length)’
e2fsprogs-1.47.3/misc/tune2fs.c:1048:12: enter_function: entry to ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1050:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1057:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘has_casefold_inode’
e2fsprogs-1.47.3/misc/tune2fs.c:1061:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1062:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:1062:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:1066:26: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:1066:26: danger: ‘malloc((long unsigned int)length)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
# 1064|   
# 1065|   	do {
# 1066|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
# 1067|   		if (retval)
# 1068|   			fatal_err(retval, "while getting next inode");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def689]
e2fsprogs-1.47.3/misc/tune2fs.c:2372:36: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/tune2fs.c:2273:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:2274:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2279:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2280:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2283:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2287:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2288:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2289:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2293:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2295:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2295:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2325:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2325:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2329:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2329:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2333:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2333:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2337:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2337:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2352:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2368:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2372:36: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2372:36: throw: if ‘e2p_string2hash’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2372:36: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 2370|   				continue;
# 2371|   			}
# 2372|-> 			hash_alg = e2p_string2hash(arg);
# 2373|   			if (hash_alg < 0) {
# 2374|   				fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def690]
e2fsprogs-1.47.3/misc/tune2fs.c:2412:36: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/tune2fs.c:2263:12: enter_function: entry to ‘parse_extended_opts’
e2fsprogs-1.47.3/misc/tune2fs.c:2273:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:2274:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2279:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2280:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2283:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2287:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2288:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2289:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2293:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2295:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2295:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2325:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2325:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2329:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2329:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2333:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2333:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2337:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2337:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2352:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2367:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2385:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2385:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2396:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2396:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2397:28: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2397:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2401:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2401:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2407:29: call_function: inlined call to ‘ext2fs_has_feature_casefold’ from ‘parse_extended_opts’
e2fsprogs-1.47.3/misc/tune2fs.c:2412:36: throw: if ‘e2p_str2encoding’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2412:36: danger: ‘token’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
# 2410|   				continue;
# 2411|   			}
# 2412|-> 			encoding = e2p_str2encoding(arg);
# 2413|   			if (encoding < 0) {
# 2414|   				fprintf(stderr, _("Invalid encoding: %s\n"), arg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def691]
e2fsprogs-1.47.3/misc/tune2fs.c:2422:33: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/tune2fs.c:2263:12: enter_function: entry to ‘parse_extended_opts’
e2fsprogs-1.47.3/misc/tune2fs.c:2273:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:2274:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2279:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2280:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2283:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2287:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2288:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2289:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2293:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2295:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2295:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2325:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2325:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2329:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2329:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2333:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2333:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2337:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2337:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2352:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2367:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2385:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2385:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2396:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2396:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2397:28: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2397:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2401:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2401:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2407:29: call_function: inlined call to ‘ext2fs_has_feature_casefold’ from ‘parse_extended_opts’
e2fsprogs-1.47.3/misc/tune2fs.c:2413:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2418:25: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2422:33: throw: if ‘e2p_get_encoding_flags’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2422:33: danger: ‘token’ leaks here; was allocated at [(2)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/1)
# 2420|   			printf(_("Setting encoding to '%s'\n"), arg);
# 2421|   			sb->s_encoding_flags =
# 2422|-> 				e2p_get_encoding_flags(sb->s_encoding);
# 2423|   		} else if (!strcmp(token, "encoding_flags")) {
# 2424|   			if (!arg) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def692]
e2fsprogs-1.47.3/misc/tune2fs.c:2434:46: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/tune2fs.c:2273:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:2274:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2279:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2280:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2283:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2287:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2288:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2289:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2293:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2292:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2295:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2295:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2325:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2325:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2329:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2329:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2333:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2333:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2337:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2337:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2352:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2351:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2367:28: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2366:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2385:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2385:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2396:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2396:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2423:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2423:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2429:29: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2429:27: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/tune2fs.c:2430:28: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2430:28: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2435:50: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2434:46: throw: if ‘parse_num_blocks2’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2434:46: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
# 2432|   				continue;
# 2433|   			}
# 2434|-> 			orphan_file_blocks = parse_num_blocks2(arg,
# 2435|   						 fs->super->s_log_block_size);
# 2436|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def693]
e2fsprogs-1.47.3/misc/tune2fs.c:2586:30: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*fs.blocksize)’
e2fsprogs-1.47.3/misc/tune2fs.c:2572:12: enter_function: entry to ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2582:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2586:30: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2587:20: throw: if ‘ext2fs_blocks_count’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2586:30: danger: ‘malloc((long unsigned int)*fs.blocksize)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
# 2584|   		return retval;
# 2585|   
# 2586|-> 	for (new_blk = blk = fs->super->s_first_data_block;
# 2587|   	     blk < ext2fs_blocks_count(fs->super); blk++) {
# 2588|   		if (!ext2fs_test_block_bitmap2(bmap, blk))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def694]
e2fsprogs-1.47.3/misc/tune2fs.c:2625:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(32)’
e2fsprogs-1.47.3/misc/tune2fs.c:2572:12: enter_function: entry to ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2582:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2586:30: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2587:14: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2588:22: call_function: inlined call to ‘ext2fs_test_block_bitmap2’ from ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2588:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2591:21: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2607:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2611:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2620:26: call_function: inlined call to ‘ext2fs_get_mem’ from ‘move_block’
e2fsprogs-1.47.3/misc/tune2fs.c:2624:17: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2625:17: danger: ‘malloc(32)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/12)
# 2623|   
# 2624|   		bmv->old_loc = blk;
# 2625|-> 		bmv->new_loc = new_blk;
# 2626|   
# 2627|   		list_add(&(bmv->list), &blk_move_list);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def695]
e2fsprogs-1.47.3/misc/tune2fs.c:2695:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)(*fs.blocksize * 3))’
e2fsprogs-1.47.3/misc/tune2fs.c:2682:12: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/misc/tune2fs.c:2691:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/misc/tune2fs.c:2695:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2695:18: throw: if ‘ext2fs_open_inode_scan’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2695:18: danger: ‘malloc((long unsigned int)(*fs.blocksize * 3))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
# 2693|   		return retval;
# 2694|   
# 2695|-> 	retval = ext2fs_open_inode_scan(fs, 0, &scan);
# 2696|   	if (retval)
# 2697|   		goto err_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
e2fsprogs-1.47.3/misc/tune2fs.c:2700:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)(*fs.blocksize * 3))’
e2fsprogs-1.47.3/misc/tune2fs.c:2682:12: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/misc/tune2fs.c:2691:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/misc/tune2fs.c:2695:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2696:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2696:12: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2700:26: throw: if ‘ext2fs_get_next_inode’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2700:26: danger: ‘malloc((long unsigned int)(*fs.blocksize * 3))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
# 2698|   
# 2699|   	while (1) {
# 2700|-> 		retval = ext2fs_get_next_inode(scan, &ino, &inode);
# 2701|   		if (retval)
# 2702|   			goto err_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def697]
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)old_itable_size)’
e2fsprogs-1.47.3/misc/tune2fs.c:2783:12: enter_function: entry to ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2796:24: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2799:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2805:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: danger: ‘malloc((long unsigned int)old_itable_size)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/4)
# 2807|   		return retval;
# 2808|   
# 2809|-> 	retval = ext2fs_get_mem(new_itable_size, &new_itable);
# 2810|   	if (retval)
# 2811|   		goto err_out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def698]
e2fsprogs-1.47.3/misc/tune2fs.c:2816:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)new_itable_size)’
e2fsprogs-1.47.3/misc/tune2fs.c:2783:12: enter_function: entry to ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2796:24: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2799:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2805:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2816:25: danger: ‘malloc((long unsigned int)new_itable_size)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/7)
# 2814|   	tmp_new_itable = new_itable;
# 2815|   
# 2816|-> 	for (i = 0; i < fs->group_desc_count; i++) {
# 2817|   		blk = ext2fs_inode_table_loc(fs, i);
# 2818|   		retval = io_channel_read_blk64(fs->io, blk,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def699]
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: warning[-Wanalyzer-malloc-leak]: leak of ‘new_itable’
e2fsprogs-1.47.3/misc/tune2fs.c:2783:12: enter_function: entry to ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2796:24: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2799:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2805:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2823:29: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2839:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2816:47: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: throw: if ‘ext2fs_inode_table_loc’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: danger: ‘new_itable’ leaks here; was allocated at [(8)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/7)
# 2815|   
# 2816|   	for (i = 0; i < fs->group_desc_count; i++) {
# 2817|-> 		blk = ext2fs_inode_table_loc(fs, i);
# 2818|   		retval = io_channel_read_blk64(fs->io, blk,
# 2819|   				fs->inode_blocks_per_group, old_itable);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def700]
e2fsprogs-1.47.3/misc/tune2fs.c:2818:26: warning[-Wanalyzer-malloc-leak]: leak of ‘new_itable’
e2fsprogs-1.47.3/misc/tune2fs.c:2783:12: enter_function: entry to ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2796:24: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2799:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2805:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2823:29: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2839:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2816:47: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2818:26: throw: if ‘io_channel_read_blk64’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2818:26: danger: ‘new_itable’ leaks here; was allocated at [(8)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/7)
# 2816|   	for (i = 0; i < fs->group_desc_count; i++) {
# 2817|   		blk = ext2fs_inode_table_loc(fs, i);
# 2818|-> 		retval = io_channel_read_blk64(fs->io, blk,
# 2819|   				fs->inode_blocks_per_group, old_itable);
# 2820|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def701]
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: warning[-Wanalyzer-malloc-leak]: leak of ‘new_itable’
e2fsprogs-1.47.3/misc/tune2fs.c:2783:12: enter_function: entry to ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2796:24: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2799:41: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2805:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2809:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘expand_inode_table’
e2fsprogs-1.47.3/misc/tune2fs.c:2816:21: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2817:23: branch_true: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2820:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2823:29: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: throw: if ‘io_channel_write_blk64’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:2837:26: danger: ‘new_itable’ leaks here; was allocated at [(8)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/7)
# 2835|   		new_itable = tmp_new_itable;
# 2836|   
# 2837|-> 		retval = io_channel_write_blk64(fs->io, blk,
# 2838|   					new_ino_blks_per_grp, new_itable);
# 2839|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def702]
e2fsprogs-1.47.3/misc/tune2fs.c:3010:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/tune2fs.c:2992:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2997:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2999:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3000:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:3001:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:3005:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3008:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:3010:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:3010:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/4)
# 3008|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
# 3009|   		retval = errno;
# 3010|-> 		com_err(program_name, retval,
# 3011|   			_("while trying to delete %s"), tdb_file);
# 3012|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def703]
e2fsprogs-1.47.3/misc/tune2fs.c:3015:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/tune2fs.c:2992:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2997:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2999:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3000:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:3001:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:3005:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3015:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:3015:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/4)
# 3013|   	}
# 3014|   
# 3015|-> 	retval = set_undo_io_backing_manager(*io_ptr);
# 3016|   	if (retval)
# 3017|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
e2fsprogs-1.47.3/misc/tune2fs.c:3019:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/misc/tune2fs.c:2992:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:2997:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:2999:20: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3000:20: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/tune2fs.c:3001:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/misc/tune2fs.c:3005:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3016:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/tune2fs.c:3018:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/tune2fs.c:3019:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/misc/tune2fs.c:3019:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/4)
# 3017|   		goto errout;
# 3018|   	*io_ptr = undo_io_manager;
# 3019|-> 	retval = set_undo_io_backup_file(tdb_file);
# 3020|   	if (retval)
# 3021|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def705]
e2fsprogs-1.47.3/misc/util.c:193:42: warning[-Wanalyzer-malloc-leak]: leak of ‘token’
e2fsprogs-1.47.3/misc/util.c:169:15: acquire_memory: allocated here
e2fsprogs-1.47.3/misc/util.c:170:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
e2fsprogs-1.47.3/misc/util.c:175:9: branch_false: ...to here
e2fsprogs-1.47.3/misc/util.c:176:27: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/misc/util.c:179:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/misc/util.c:183:23: branch_false: ...to here
e2fsprogs-1.47.3/misc/util.c:184:20: branch_true: following ‘true’ branch (when ‘arg’ is non-NULL)...
e2fsprogs-1.47.3/misc/util.c:185:25: branch_true: ...to here
e2fsprogs-1.47.3/misc/util.c:192:20: branch_true: following ‘true’ branch (when the strings are equal)...
e2fsprogs-1.47.3/misc/util.c:193:42: branch_true: ...to here
e2fsprogs-1.47.3/misc/util.c:193:42: throw: if ‘get_devname’ throws an exception...
e2fsprogs-1.47.3/misc/util.c:193:42: danger: ‘token’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  191|   #endif
#  192|   		if (strcmp(token, "device") == 0) {
#  193|-> 			journal_device = get_devname(NULL, arg, NULL);
#  194|   			if (!journal_device) {
#  195|   				if (arg)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
e2fsprogs-1.47.3/resize/main.c:221:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/resize/main.c:203:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:208:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:210:20: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:211:20: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/main.c:212:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:216:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:219:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/main.c:221:17: throw: if ‘com_err’ throws an exception...
e2fsprogs-1.47.3/resize/main.c:221:17: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  219|   	if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
#  220|   		retval = errno;
#  221|-> 		com_err(program_name, retval,
#  222|   			_("while trying to delete %s"), tdb_file);
#  223|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
e2fsprogs-1.47.3/resize/main.c:226:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/resize/main.c:203:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:208:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:210:20: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:211:20: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/main.c:212:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:216:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:226:18: throw: if ‘set_undo_io_backing_manager’ throws an exception...
e2fsprogs-1.47.3/resize/main.c:226:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  224|   	}
#  225|   
#  226|-> 	retval = set_undo_io_backing_manager(*io_ptr);
#  227|   	if (retval)
#  228|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
e2fsprogs-1.47.3/resize/main.c:230:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tdb_file’
e2fsprogs-1.47.3/resize/main.c:203:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:208:12: branch_false: following ‘false’ branch (when ‘tmp_name’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:210:20: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:211:20: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/main.c:212:12: branch_false: following ‘false’ branch (when ‘tdb_file’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:216:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:227:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:229:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:230:18: throw: if ‘set_undo_io_backup_file’ throws an exception...
e2fsprogs-1.47.3/resize/main.c:230:18: danger: ‘tdb_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  228|   		goto errout;
#  229|   	*io_ptr = undo_io_manager;
#  230|-> 	retval = set_undo_io_backup_file(tdb_file);
#  231|   	if (retval)
#  232|   		goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
e2fsprogs-1.47.3/resize/main.c:353:26: warning[-Wanalyzer-malloc-leak]: leak of ‘mtpt’
e2fsprogs-1.47.3/resize/main.c:286:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/main.c:330:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:333:28: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:334:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:336:13: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:336:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:339:22: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:340:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/main.c:340:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:349:24: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/main.c:350:20: branch_false: following ‘false’ branch (when ‘mtpt’ is non-NULL)...
e2fsprogs-1.47.3/resize/main.c:352:22: branch_false: ...to here
e2fsprogs-1.47.3/resize/main.c:353:26: throw: if ‘ext2fs_check_mount_point’ throws an exception...
e2fsprogs-1.47.3/resize/main.c:353:26: danger: ‘mtpt’ leaks here; was allocated at [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
#  351|   			return ENOMEM;
#  352|   		mtpt[len-1] = 0;
#  353|-> 		retval = ext2fs_check_mount_point(device_name, &mount_flags,
#  354|   						  mtpt, len);
#  355|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
e2fsprogs-1.47.3/resize/resize2fs.c:543:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)length)’
e2fsprogs-1.47.3/resize/resize2fs.c:519:18: enter_function: entry to ‘zero_high_bits_in_inodes’
e2fsprogs-1.47.3/resize/resize2fs.c:522:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:524:25: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:528:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:531:13: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:531:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:534:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:535:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:538:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:538:18: call_function: inlined call to ‘ext2fs_get_mem’ from ‘zero_high_bits_in_inodes’
e2fsprogs-1.47.3/resize/resize2fs.c:543:26: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:543:26: danger: ‘malloc((long unsigned int)length)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  541|   
#  542|   	do {
#  543|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode, length);
#  544|   		if (retval)
#  545|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
e2fsprogs-1.47.3/resize/resize2fs.c:1910:27: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2246:26: call_function: calling ‘migrate_ea_block’ from ‘inode_scan_and_fix’
# 1908|   static __u64 extent_translate(ext2_filsys fs, ext2_extent extent, __u64 old_loc)
# 1909|   {
# 1910|-> 	__u64 new_block = C2B(ext2fs_extent_translate(extent, B2C(old_loc)));
# 1911|   
# 1912|   	if (new_block != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
e2fsprogs-1.47.3/resize/resize2fs.c:2004:13: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2246:26: call_function: calling ‘migrate_ea_block’ from ‘inode_scan_and_fix’
# 2002|   
# 2003|   	/* No EA block or no remapping?  Quit early. */
# 2004|-> 	if (ext2fs_file_acl_block(rfs->old_fs, inode) == 0 || !rfs->bmap)
# 2005|   		return 0;
# 2006|   	new_block = extent_translate(rfs->old_fs, rfs->bmap,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
e2fsprogs-1.47.3/resize/resize2fs.c:2007:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2246:26: call_function: calling ‘migrate_ea_block’ from ‘inode_scan_and_fix’
# 2005|   		return 0;
# 2006|   	new_block = extent_translate(rfs->old_fs, rfs->bmap,
# 2007|-> 		ext2fs_file_acl_block(rfs->old_fs, inode));
# 2008|   	if (new_block == 0)
# 2009|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
e2fsprogs-1.47.3/resize/resize2fs.c:2019:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*rfs_25(D)->old_fs.blocksize)’
e2fsprogs-1.47.3/resize/resize2fs.c:1996:18: enter_function: entry to ‘migrate_ea_block’
e2fsprogs-1.47.3/resize/resize2fs.c:2004:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2008:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2012:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2015:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2016:38: branch_true: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2016:23: call_function: inlined call to ‘ext2fs_get_mem’ from ‘migrate_ea_block’
e2fsprogs-1.47.3/resize/resize2fs.c:2019:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2020:23: throw: if ‘ext2fs_read_ext_attr3’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2019:17: danger: ‘malloc((long unsigned int)*rfs_25(D)->old_fs.blocksize)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 2017|   		if (err)
# 2018|   			return err;
# 2019|-> 		rfs->old_fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
# 2020|   		err = ext2fs_read_ext_attr3(rfs->old_fs, new_block, buf, ino);
# 2021|   		rfs->old_fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
e2fsprogs-1.47.3/resize/resize2fs.c:2213:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2212:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2214:45: branch_true: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2213:26: throw: if the called function throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2213:26: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
# 2211|   
# 2212|   	if (rfs->progress) {
# 2213|-> 		retval = (rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
# 2214|   					 0, rfs->old_fs->group_desc_count);
# 2215|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
e2fsprogs-1.47.3/resize/resize2fs.c:2218:9: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2218:9: throw: if ‘ext2fs_set_inode_callback’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2218:9: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 2216|   			goto errout;
# 2217|   	}
# 2218|-> 	ext2fs_set_inode_callback(scan, progress_callback, (void *) rfs);
# 2219|   	pb.rfs = rfs;
# 2220|   	pb.inode = inode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
# 2232|   	 */
# 2233|   	while (1) {
# 2234|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode, inode_size);
# 2235|   		if (retval) goto errout;
# 2236|   		if (!ino)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: warning[-Wanalyzer-malloc-leak]: leak of ‘inode’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: throw: if ‘ext2fs_get_next_inode_full’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2234:26: danger: ‘inode’ leaks here; was allocated at [(16)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/15)
# 2232|   	 */
# 2233|   	while (1) {
# 2234|-> 		retval = ext2fs_get_next_inode_full(scan, &ino, inode, inode_size);
# 2235|   		if (retval) goto errout;
# 2236|   		if (!ino)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2247:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2250:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2251:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: throw: if ‘ext2fs_new_inode’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 2257|   		 * set up the new inode before we start rewriting blocks.
# 2258|   		 */
# 2259|-> 		retval = ext2fs_new_inode(rfs->new_fs, 0, 0, 0, &new_inode);
# 2260|   		if (retval)
# 2261|   			goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2247:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2250:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2251:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2260:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: throw: if ‘ext2fs_inode_alloc_stats2’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
# 2261|   			goto errout;
# 2262|   
# 2263|-> 		ext2fs_inode_alloc_stats2(rfs->new_fs, new_inode, +1,
# 2264|   					  pb.is_dir);
# 2265|   		/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
e2fsprogs-1.47.3/resize/resize2fs.c:2275:26: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2247:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2250:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2251:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2260:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2269:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2275:26: branch_true: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2275:26: throw: if ‘ext2fs_write_inode_full’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2275:26: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
# 2273|   				rfs->old_fs->now : time(0);
# 2274|   
# 2275|-> 		retval = ext2fs_write_inode_full(rfs->old_fs, new_inode,
# 2276|   						inode, inode_size);
# 2277|   		if (retval)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
e2fsprogs-1.47.3/resize/resize2fs.c:2286:34: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2247:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2250:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2251:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2260:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2277:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2279:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2285:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2286:34: branch_true: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2286:34: throw: if ‘ext2fs_create_extent_table’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2286:34: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
# 2284|   #endif
# 2285|   		if (!rfs->imap) {
# 2286|-> 			retval = ext2fs_create_extent_table(&rfs->imap, 0);
# 2287|   			if (retval)
# 2288|   				goto errout;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def723]
e2fsprogs-1.47.3/resize/resize2fs.c:2290:17: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2223:22: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2224:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2236:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2239:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2247:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2250:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2251:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2259:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2260:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2263:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2277:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2279:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2285:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2290:17: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2290:17: throw: if ‘ext2fs_add_extent_entry’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2290:17: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
# 2288|   				goto errout;
# 2289|   		}
# 2290|-> 		ext2fs_add_extent_entry(rfs->imap, ino, new_inode);
# 2291|   
# 2292|   remap_blocks:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def724]
e2fsprogs-1.47.3/resize/resize2fs.c:2346:9: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: following ‘false’ branch (when ‘inode’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2225:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2235:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2236:21: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2339:12: branch_false: following ‘false’ branch (when ‘update_ea_inode_refs == 0’)...
e2fsprogs-1.47.3/resize/resize2fs.c:2346:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2346:9: throw: if the called function throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2346:9: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
# 2344|   			goto errout;
# 2345|   	}
# 2346|-> 	io_channel_flush(rfs->old_fs->io);
# 2347|   
# 2348|   errout:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def725]
e2fsprogs-1.47.3/resize/resize2fs.c:2349:9: warning[-Wanalyzer-malloc-leak]: leak of ‘block_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2182:18: enter_function: entry to ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2202:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2204:18: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2205:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2206:35: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: call_function: calling ‘ext2fs_get_array’ from ‘inode_scan_and_fix’
e2fsprogs-1.47.3/resize/resize2fs.c:2206:18: return_function: returning to ‘inode_scan_and_fix’ from ‘ext2fs_get_array’
e2fsprogs-1.47.3/resize/resize2fs.c:2207:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2209:26: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2349:9: throw: if ‘reset_com_err_hook’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2349:9: danger: ‘block_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
# 2347|   
# 2348|   errout:
# 2349|-> 	reset_com_err_hook();
# 2350|   	rfs->old_fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS;
# 2351|   	if (rfs->bmap) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
e2fsprogs-1.47.3/resize/resize2fs.c:2909:18: warning[-Wanalyzer-malloc-leak]: leak of ‘orphan_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2884:18: enter_function: entry to ‘fix_orphan_file_inode’
e2fsprogs-1.47.3/resize/resize2fs.c:2892:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2893:14: call_function: inlined call to ‘ext2fs_has_feature_metadata_csum’ from ‘fix_orphan_file_inode’
e2fsprogs-1.47.3/resize/resize2fs.c:2892:13: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2896:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2898:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2900:29: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2900:22: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/resize2fs.c:2901:12: branch_false: following ‘false’ branch (when ‘orphan_buf’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2904:9: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2909:18: throw: if ‘ext2fs_block_iterate3’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2909:18: danger: ‘orphan_buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
# 2907|   	pd.generation = inode.i_generation;
# 2908|   
# 2909|-> 	retval = ext2fs_block_iterate3(fs, fs->super->s_orphan_file_inum,
# 2910|   				       BLOCK_FLAG_DATA_ONLY,
# 2911|   				       orphan_buf, process_orphan_block, &pd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def727]
e2fsprogs-1.47.3/resize/resize2fs.c:2938:26: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_buf’
e2fsprogs-1.47.3/resize/resize2fs.c:2934:22: acquire_memory: allocated here
e2fsprogs-1.47.3/resize/resize2fs.c:2935:12: branch_false: following ‘false’ branch (when ‘bitmap_buf’ is non-NULL)...
e2fsprogs-1.47.3/resize/resize2fs.c:2935:12: branch_false: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2937:25: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/resize/resize2fs.c:2939:35: branch_true: ...to here
e2fsprogs-1.47.3/resize/resize2fs.c:2938:26: throw: if ‘ext2fs_get_block_bitmap_range2’ throws an exception...
e2fsprogs-1.47.3/resize/resize2fs.c:2938:26: danger: ‘bitmap_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 2936|   		return ENOMEM;
# 2937|   	for (group = 0; group < fs->group_desc_count; group++) {
# 2938|-> 		retval = ext2fs_get_block_bitmap_range2(fs->block_map,
# 2939|   			B2C(blk), fs->super->s_clusters_per_group, bitmap_buf);
# 2940|   		if (retval) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def728]
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/crcsum.c:38:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
e2fsprogs-1.47.3/tests/progs/crcsum.c:47:13: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:47:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:50:31: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:50:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/crcsum.c:51:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:51:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:58:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:60:27: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:62:20: branch_true: following ‘true’ branch (when ‘cnt != 0’)...
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: throw: if ‘ext2fs_crc32c_le’ throws an exception...
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   61|   
#   62|   		if (cnt)
#   63|-> 			crc = csum_func(crc, buf, cnt);
#   64|   	}
#   65|   	printf("%u\n", crc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def729]
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/crcsum.c:38:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
e2fsprogs-1.47.3/tests/progs/crcsum.c:47:13: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:47:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:50:31: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:50:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/crcsum.c:51:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:51:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:58:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/crcsum.c:60:27: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:62:20: branch_true: following ‘true’ branch (when ‘cnt != 0’)...
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: throw: if ‘ext2fs_crc32c_le’ throws an exception...
e2fsprogs-1.47.3/tests/progs/crcsum.c:63:31: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   61|   
#   62|   		if (cnt)
#   63|-> 			crc = csum_func(crc, buf, cnt);
#   64|   	}
#   65|   	printf("%u\n", crc);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def730]
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  284|   		}
#  285|   	}
#  286|-> 	fflush(stdout);
#  287|   	fflush(stderr);
#  288|   	setbuf(stdout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def731]
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  284|   		}
#  285|   	}
#  286|-> 	fflush(stdout);
#  287|   	fflush(stderr);
#  288|   	setbuf(stdout, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def732]
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  285|   	}
#  286|   	fflush(stdout);
#  287|-> 	fflush(stderr);
#  288|   	setbuf(stdout, NULL);
#  289|   	setbuf(stderr, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:287:9: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  285|   	}
#  286|   	fflush(stdout);
#  287|-> 	fflush(stderr);
#  288|   	setbuf(stdout, NULL);
#  289|   	setbuf(stderr, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def734]
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:290:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:21: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:293:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:296:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:298:25: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:301:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:303:22: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:304:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: following ‘false’ branch (when ‘noecho != 0’)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: throw: if ‘ss_execute_line’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  306|   		if (!noecho)
#  307|   			printf("test_icount: %s\n", buf);
#  308|-> 		retval = ss_execute_line(sci_idx, buf);
#  309|   		if (retval) {
#  310|   			ss_perror(sci_idx, retval, buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:290:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:21: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:293:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:296:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:298:25: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:301:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:303:22: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:304:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: following ‘false’ branch (when ‘noecho != 0’)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: throw: if ‘ss_execute_line’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:308:26: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  306|   		if (!noecho)
#  307|   			printf("test_icount: %s\n", buf);
#  308|-> 		retval = ss_execute_line(sci_idx, buf);
#  309|   		if (retval) {
#  310|   			ss_perror(sci_idx, retval, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def736]
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:290:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:21: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:293:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:301:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:303:22: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:304:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:309:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  308|   		retval = ss_execute_line(sci_idx, buf);
#  309|   		if (retval) {
#  310|-> 			ss_perror(sci_idx, retval, buf);
#  311|   			exit_status++;
#  312|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def737]
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:290:16: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:21: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:291:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:293:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:301:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:303:22: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:304:20: branch_false: following ‘false’ branch (when ‘cp’ is NULL)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:306:20: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:309:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: branch_true: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: throw: if ‘ss_perror’ throws an exception...
e2fsprogs-1.47.3/tests/progs/test_icount.c:310:25: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  308|   		retval = ss_execute_line(sci_idx, buf);
#  309|   		if (retval) {
#  310|-> 			ss_perror(sci_idx, retval, buf);
#  311|   			exit_status++;
#  312|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def738]
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_resource: opened here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: danger: ‘f’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  314|   	if (f != stdin)
#  315|   		fclose(f);
#  316|-> 	return exit_status;
#  317|   }
#  318|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def739]
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
e2fsprogs-1.47.3/tests/progs/test_icount.c:277:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:280:21: acquire_memory: allocated here
e2fsprogs-1.47.3/tests/progs/test_icount.c:281:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:286:9: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:314:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: branch_false: ...to here
e2fsprogs-1.47.3/tests/progs/test_icount.c:316:16: danger: ‘f’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  314|   	if (f != stdin)
#  315|   		fclose(f);
#  316|-> 	return exit_status;
#  317|   }
#  318|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def740]
e2fsprogs-1.47.3/util/subst.c:378:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:378:23: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:378:23: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  376|   		strcpy(newfn, outfn);
#  377|   		strcat(newfn, ".new");
#  378|-> 		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|   			perror(newfn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def741]
e2fsprogs-1.47.3/util/subst.c:378:23: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:378:23: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:378:23: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  376|   		strcpy(newfn, outfn);
#  377|   		strcat(newfn, ".new");
#  378|-> 		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|   			perror(newfn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
e2fsprogs-1.47.3/util/subst.c:378:23: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:378:23: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:378:23: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  376|   		strcpy(newfn, outfn);
#  377|   		strcat(newfn, ".new");
#  378|-> 		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|   			perror(newfn);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def743]
e2fsprogs-1.47.3/util/subst.c:380:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:380:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:380:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:380:25: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  378|   		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|-> 			perror(newfn);
#  381|   			exit(1);
#  382|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
e2fsprogs-1.47.3/util/subst.c:380:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:380:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:380:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:380:25: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  378|   		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|-> 			perror(newfn);
#  381|   			exit(1);
#  382|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
e2fsprogs-1.47.3/util/subst.c:380:25: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:380:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:380:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:380:25: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  378|   		ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644);
#  379|   		if (ofd < 0) {
#  380|-> 			perror(newfn);
#  381|   			exit(1);
#  382|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def746]
e2fsprogs-1.47.3/util/subst.c:385:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_true: following ‘true’ branch (when ‘out’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:385:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:385:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:385:25: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  383|   		out = fdopen(ofd, "w+");
#  384|   		if (!out) {
#  385|-> 			perror("fdopen");
#  386|   			exit(1);
#  387|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def747]
e2fsprogs-1.47.3/util/subst.c:385:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_true: following ‘true’ branch (when ‘out’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:385:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:385:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:385:25: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  383|   		out = fdopen(ofd, "w+");
#  384|   		if (!out) {
#  385|-> 			perror("fdopen");
#  386|   			exit(1);
#  387|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def748]
e2fsprogs-1.47.3/util/subst.c:385:25: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_true: following ‘true’ branch (when ‘out’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:385:25: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:385:25: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:385:25: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  383|   		out = fdopen(ofd, "w+");
#  384|   		if (!out) {
#  385|-> 			perror("fdopen");
#  386|   			exit(1);
#  387|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def749]
e2fsprogs-1.47.3/util/subst.c:389:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:389:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:389:22: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  387|   		}
#  388|   
#  389|-> 		fd = open(outfn, O_RDONLY);
#  390|   		if (fd > 0) {
#  391|   			/* save the original atime, if possible */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def750]
e2fsprogs-1.47.3/util/subst.c:389:22: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:389:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:389:22: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  387|   		}
#  388|   
#  389|-> 		fd = open(outfn, O_RDONLY);
#  390|   		if (fd > 0) {
#  391|   			/* save the original atime, if possible */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def751]
e2fsprogs-1.47.3/util/subst.c:389:22: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:389:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:389:22: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  387|   		}
#  388|   
#  389|-> 		fd = open(outfn, O_RDONLY);
#  390|   		if (fd > 0) {
#  391|   			/* save the original atime, if possible */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def752]
e2fsprogs-1.47.3/util/subst.c:389:22: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:383:23: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:389:22: throw: if ‘open’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:389:22: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
#  387|   		}
#  388|   
#  389|-> 		fd = open(outfn, O_RDONLY);
#  390|   		if (fd > 0) {
#  391|   			/* save the original atime, if possible */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def753]
e2fsprogs-1.47.3/util/subst.c:390:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(outfn, 0)’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:389:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:390:20: danger: ‘open(outfn, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
#  388|   
#  389|   		fd = open(outfn, O_RDONLY);
#  390|-> 		if (fd > 0) {
#  391|   			/* save the original atime, if possible */
#  392|   			if (fstat(fd, &stbuf) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def754]
e2fsprogs-1.47.3/util/subst.c:404:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_resource: opened here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:392:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:403:28: branch_true: following ‘true’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:404:33: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:404:33: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:404:33: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  402|   			old = fdopen(fd, "r");
#  403|   			if (!old)
#  404|-> 				close(fd);
#  405|   		}
#  406|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def755]
e2fsprogs-1.47.3/util/subst.c:404:33: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:360:32: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:360:22: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:361:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:365:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:392:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:403:28: branch_true: following ‘true’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:404:33: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:404:33: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:404:33: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  402|   			old = fdopen(fd, "r");
#  403|   			if (!old)
#  404|-> 				close(fd);
#  405|   		}
#  406|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def756]
e2fsprogs-1.47.3/util/subst.c:404:33: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:392:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:403:28: branch_true: following ‘true’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:404:33: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:404:33: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:404:33: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  402|   			old = fdopen(fd, "r");
#  403|   			if (!old)
#  404|-> 				close(fd);
#  405|   		}
#  406|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def757]
e2fsprogs-1.47.3/util/subst.c:404:33: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:383:23: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:392:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:403:28: branch_true: following ‘true’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:404:33: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:404:33: throw: if ‘close’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:404:33: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
#  402|   			old = fdopen(fd, "r");
#  403|   			if (!old)
#  404|-> 				close(fd);
#  405|   		}
#  406|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def758]
e2fsprogs-1.47.3/util/subst.c:419:17: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:418:12: branch_true: following ‘true’ branch (when ‘outfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:419:17: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:419:17: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:419:17: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  417|   	fclose(in);
#  418|   	if (outfn) {
#  419|-> 		fflush(out);
#  420|   		rewind(out);
#  421|   		if (old && compare_file(old, out)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def759]
e2fsprogs-1.47.3/util/subst.c:419:17: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:383:23: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:418:12: branch_true: following ‘true’ branch (when ‘outfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:419:17: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:419:17: throw: if ‘fflush’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:419:17: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
#  417|   	fclose(in);
#  418|   	if (outfn) {
#  419|-> 		fflush(out);
#  420|   		rewind(out);
#  421|   		if (old && compare_file(old, out)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def760]
e2fsprogs-1.47.3/util/subst.c:420:17: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:418:12: branch_true: following ‘true’ branch (when ‘outfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:419:17: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:420:17: throw: if ‘rewind’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:420:17: danger: ‘newfn’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
#  418|   	if (outfn) {
#  419|   		fflush(out);
#  420|-> 		rewind(out);
#  421|   		if (old && compare_file(old, out)) {
#  422|   			if (verbose)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
e2fsprogs-1.47.3/util/subst.c:420:17: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
e2fsprogs-1.47.3/util/subst.c:359:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:367:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:383:23: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:390:20: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:418:12: branch_true: following ‘true’ branch (when ‘outfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:419:17: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:420:17: throw: if ‘rewind’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:420:17: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  418|   	if (outfn) {
#  419|   		fflush(out);
#  420|-> 		rewind(out);
#  421|   		if (old && compare_file(old, out)) {
#  422|   			if (verbose)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def762]
e2fsprogs-1.47.3/util/subst.c:456:33: warning[-Wanalyzer-malloc-leak]: leak of ‘newfn’
e2fsprogs-1.47.3/util/subst.c:369:12: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:370:29: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:371:34: acquire_memory: allocated here
e2fsprogs-1.47.3/util/subst.c:372:20: branch_false: following ‘false’ branch (when ‘newfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:376:17: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:379:20: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/subst.c:383:23: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:384:20: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:389:22: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:418:12: branch_true: following ‘true’ branch (when ‘outfn’ is non-NULL)...
e2fsprogs-1.47.3/util/subst.c:419:17: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:421:20: branch_false: following ‘false’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:445:28: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:448:28: branch_true: following ‘true’ branch (when ‘ofd != -1’)...
e2fsprogs-1.47.3/util/subst.c:449:40: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:452:28: branch_false: following ‘false’ branch (when ‘old’ is NULL)...
e2fsprogs-1.47.3/util/subst.c:455:29: branch_false: ...to here
e2fsprogs-1.47.3/util/subst.c:455:28: branch_true: following ‘true’ branch...
e2fsprogs-1.47.3/util/subst.c:456:33: branch_true: ...to here
e2fsprogs-1.47.3/util/subst.c:456:33: throw: if ‘perror’ throws an exception...
e2fsprogs-1.47.3/util/subst.c:456:33: danger: ‘newfn’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  454|   			old = NULL;
#  455|   			if (rename(newfn, outfn) < 0) {
#  456|-> 				perror("rename");
#  457|   				exit(1);
#  458|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def763]
e2fsprogs-1.47.3/util/symlinks.c:289:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(path)’
e2fsprogs-1.47.3/util/symlinks.c:326:5: enter_function: entry to ‘main’
e2fsprogs-1.47.3/util/symlinks.c:346:12: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/symlinks.c:358:14: branch_false: ...to here
e2fsprogs-1.47.3/util/symlinks.c:361:16: branch_true: following ‘true’ branch (when ‘argc != 0’)...
e2fsprogs-1.47.3/util/symlinks.c:362:17: branch_true: ...to here
e2fsprogs-1.47.3/util/symlinks.c:384:25: call_function: calling ‘tidy_path’ from ‘main’
e2fsprogs-1.47.3/util/symlinks.c:384:25: return_function: returning to ‘main’ from ‘tidy_path’
e2fsprogs-1.47.3/util/symlinks.c:385:28: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/symlinks.c:387:34: branch_false: ...to here
e2fsprogs-1.47.3/util/symlinks.c:387:33: branch_false: following ‘false’ branch...
e2fsprogs-1.47.3/util/symlinks.c:390:61: branch_false: ...to here
e2fsprogs-1.47.3/util/symlinks.c:390:33: call_function: calling ‘dirwalk’ from ‘main’
#  287|   	}
#  288|   
#  289|-> 	name = path + pathlen;
#  290|   	if (*(name-1) != '/')
#  291|   		*name++ = '/'; 

Error: COMPILER_WARNING: [#def764]
e2fsprogs-1.47.3/util/symlinks.c: scope_hint: In function ‘main’
e2fsprogs-1.47.3/util/symlinks.c:383:33: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 4097 bytes from a string of length 4097
#  383 |                                 strncpy(path, cwd, sizeof(path)-1);
#      |                                 ^
#  381|   				*path = '\0';
#  382|   			else
#  383|-> 				strncpy(path, cwd, sizeof(path)-1);
#  384|   			tidy_path(strncat(path, p, sizeof(path)-1));
#  385|   			if (lstat(path, &st) == -1)

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-111.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-namee2fsprogs-1.47.3-3.fc44
store-results-to/tmp/tmploii9bf3/e2fsprogs-1.47.3-3.fc44.tar.xz
time-created2026-01-08 15:56:15
time-finished2026-01-08 15:59:38
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmploii9bf3/e2fsprogs-1.47.3-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmploii9bf3/e2fsprogs-1.47.3-3.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9