btrfs-progs-6.17.1-2.fc44

List of Findings

Error: SHELLCHECK_WARNING: [#def1]
/usr/bin/fsck.btrfs:25:2: warning[SC2220]: Invalid flags are not handled. Add a *) case.
#   23|   while getopts ":aApy" c
#   24|   do
#   25|-> 	case $c in
#   26|   	a|A|p|y)	AUTO=true;;
#   27|   	esac

Error: SHELLCHECK_WARNING (CWE-569): [#def2]
/usr/bin/fsck.btrfs:30:12: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#   28|   done
#   29|   shift $(($OPTIND - 1))
#   30|-> eval DEV=\${$#}
#   31|   if [ ! -e $DEV ]; then
#   32|   	echo "$0: $DEV does not exist"

Error: SHELLCHECK_WARNING (CWE-569): [#def3]
/usr/bin/fsck.btrfs:30:15: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#   28|   done
#   29|   shift $(($OPTIND - 1))
#   30|-> eval DEV=\${$#}
#   31|   if [ ! -e $DEV ]; then
#   32|   	echo "$0: $DEV does not exist"

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:65:31: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:55:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:56:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:56:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:62:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:63:29: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:65:31: throw: if ‘read_data_from_disk’ throws an exception...
btrfs-progs-v6.17.1/btrfs-corrupt-block.c:65:31: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   63|   			u64 read_len = sectorsize;
#   64|   
#   65|-> 			ret = read_data_from_disk(fs_info, buf, logical,
#   66|   						  &read_len, mirror_num);
#   67|   			if (read_len < sectorsize)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
btrfs-progs-v6.17.1/btrfs-find-root.c:134:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gen_cache’
btrfs-progs-v6.17.1/btrfs-find-root.c:101:12: enter_function: entry to ‘add_eb_to_result’
btrfs-progs-v6.17.1/btrfs-find-root.c:115:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-find-root.c:127:29: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-find-root.c:128:17: call_function: calling ‘bugon_trace’ from ‘add_eb_to_result’
btrfs-progs-v6.17.1/btrfs-find-root.c:128:17: return_function: returning to ‘add_eb_to_result’ from ‘bugon_trace’
btrfs-progs-v6.17.1/btrfs-find-root.c:134:17: throw: if ‘cache_tree_init’ throws an exception...
btrfs-progs-v6.17.1/btrfs-find-root.c:134:17: danger: ‘gen_cache’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  132|   		cache->objectid = 0;
#  133|   		gen_cache->highest_level = 0;
#  134|-> 		cache_tree_init(&gen_cache->eb_tree);
#  135|   
#  136|   		ret = insert_cache_extent(result, cache);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
btrfs-progs-v6.17.1/btrfs-map-logical.c:256:43: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:256:43: throw: if ‘arg_strtou64’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:256:43: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  254|   		switch(c) {
#  255|   			case 'l':
#  256|-> 				logical = arg_strtou64(optarg);
#  257|   				break;
#  258|   			case 'c':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
btrfs-progs-v6.17.1/btrfs-map-logical.c:259:40: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:259:40: throw: if ‘arg_strtou64’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:259:40: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  257|   				break;
#  258|   			case 'c':
#  259|-> 				copy = arg_strtou64(optarg);
#  260|   				break;
#  261|   			case 'b':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
btrfs-progs-v6.17.1/btrfs-map-logical.c:262:41: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:262:41: throw: if ‘arg_strtou64’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:262:41: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  260|   				break;
#  261|   			case 'b':
#  262|-> 				bytes = arg_strtou64(optarg);
#  263|   				break;
#  264|   			case 'o':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
btrfs-progs-v6.17.1/btrfs-map-logical.c:268:33: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:268:33: throw: if ‘usage’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:268:33: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  266|   				break;
#  267|   			default:
#  268|-> 				usage(&map_logical_cmd, 1);
#  269|   		}
#  270|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: throw: if ‘set_argv0’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  269|   		}
#  270|   	}
#  271|-> 	set_argv0(argv);
#  272|   	if (check_argc_min(argc - optind, 1))
#  273|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:13: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:13: throw: if ‘check_argc_min’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:13: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  270|   	}
#  271|   	set_argv0(argv);
#  272|-> 	if (check_argc_min(argc - optind, 1))
#  273|   		return 1;
#  274|   	if (logical == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
btrfs-progs-v6.17.1/btrfs-map-logical.c:275:17: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_true: following ‘true’ branch (when ‘logical == 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:275:17: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:275:17: throw: if ‘usage’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:275:17: danger: ‘output_file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  273|   		return 1;
#  274|   	if (logical == 0)
#  275|-> 		usage(&map_logical_cmd, 1);
#  276|   
#  277|   	dev = argv[optind];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
btrfs-progs-v6.17.1/btrfs-map-logical.c:279:9: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: following ‘false’ branch (when ‘logical != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:277:19: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:279:9: throw: if ‘cache_tree_init’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:279:9: danger: ‘output_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  277|   	dev = argv[optind];
#  278|   
#  279|-> 	cache_tree_init(&root_cache);
#  280|   
#  281|   	root = open_ctree(dev, 0, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
btrfs-progs-v6.17.1/btrfs-map-logical.c:281:16: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: following ‘false’ branch (when ‘logical != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:277:19: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:281:16: throw: if ‘open_ctree’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:281:16: danger: ‘output_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  279|   	cache_tree_init(&root_cache);
#  280|   
#  281|-> 	root = open_ctree(dev, 0, 0);
#  282|   	if (!root) {
#  283|   		error("open ctree failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
btrfs-progs-v6.17.1/btrfs-map-logical.c:283:17: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: following ‘false’ branch (when ‘logical != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:277:19: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:282:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:283:17: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:283:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:283:17: danger: ‘output_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  281|   	root = open_ctree(dev, 0, 0);
#  282|   	if (!root) {
#  283|-> 		error("open ctree failed");
#  284|   		free(output_file);
#  285|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
btrfs-progs-v6.17.1/btrfs-map-logical.c:294:34: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: following ‘false’ branch (when ‘logical != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:277:19: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:282:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:288:9: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:289:12: branch_true: following ‘true’ branch (when ‘output_file’ is non-NULL)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:290:21: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:290:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:294:34: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:294:34: throw: if ‘open’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:294:34: danger: ‘output_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  292|   			info_file = stderr;
#  293|   		} else {
#  294|-> 			out_fd = open(output_file, O_RDWR | O_CREAT, 0600);
#  295|   			if (out_fd < 0)
#  296|   				goto close;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
btrfs-progs-v6.17.1/btrfs-map-logical.c:300:33: warning[-Wanalyzer-malloc-leak]: leak of ‘output_file’
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:254:17: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:265:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/btrfs-map-logical.c:252:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:271:9: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:272:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:274:12: branch_false: following ‘false’ branch (when ‘logical != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:277:19: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:282:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:288:9: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:289:12: branch_true: following ‘true’ branch (when ‘output_file’ is non-NULL)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:290:21: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:290:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:294:34: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:295:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/btrfs-map-logical.c:297:31: branch_false: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:298:28: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/btrfs-map-logical.c:300:33: branch_true: ...to here
btrfs-progs-v6.17.1/btrfs-map-logical.c:300:33: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/btrfs-map-logical.c:300:33: danger: ‘output_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  298|   			if (ret) {
#  299|   				ret = 1;
#  300|-> 				close(out_fd);
#  301|   				goto close;
#  302|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
btrfs-progs-v6.17.1/check/mode-common.c:629:9: warning[-Wanalyzer-malloc-leak]: leak of ‘excluded_extents’
btrfs-progs-v6.17.1/check/mode-common.c:626:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:627:12: branch_false: following ‘false’ branch (when ‘excluded_extents’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:629:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:629:9: throw: if ‘extent_io_tree_init’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:629:9: danger: ‘excluded_extents’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  627|   	if (!excluded_extents)
#  628|   		return -ENOMEM;
#  629|-> 	extent_io_tree_init(gfs_info, excluded_extents, 0);
#  630|   	gfs_info->excluded_extents = excluded_extents;
#  631|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
btrfs-progs-v6.17.1/check/mode-common.c:1217:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1549:23: call_function: calling ‘populate_csum’ from ‘fill_csum_tree_from_extent’
# 1215|   
# 1216|   	while (offset < len) {
# 1217|-> 		ret = read_data_from_disk(fs_info, buf, start + offset,
# 1218|   					  &sectorsize, 0);
# 1219|   		if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
btrfs-progs-v6.17.1/check/mode-common.c:1253:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1253:15: throw: if ‘btrfs_search_slot’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1253:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1251|   	key.type = 0;
# 1252|   	key.offset = 0;
# 1253|-> 	ret = btrfs_search_slot(NULL, cur_root, &key, &path, 0, 0);
# 1254|   	if (ret < 0)
# 1255|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1291:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: throw: if ‘btrfs_csum_root’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: danger: ‘buf’ leaks here; was allocated at [(2)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/1)
# 1301|   		 * not other way to ensure the correctness.
# 1302|   		 */
# 1303|-> 		csum_root = btrfs_csum_root(gfs_info, start);
# 1304|   		len = btrfs_file_extent_disk_num_bytes(node, fi);
# 1305|   		ret = populate_csum(trans, csum_root, buf, start, len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
btrfs-progs-v6.17.1/check/mode-common.c:1315:31: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1291:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: call_function: calling ‘populate_csum’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: return_function: returning to ‘fill_csum_tree_from_one_fs_root’ from ‘populate_csum’
btrfs-progs-v6.17.1/check/mode-common.c:1306:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1313:34: call_function: inlined call to ‘btrfs_file_extent_offset’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1315:31: throw: if ‘btrfs_del_csums’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1315:31: danger: ‘buf’ leaks here; was allocated at [(2)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/1)
# 1313|   			start += btrfs_file_extent_offset(node, fi);
# 1314|   			len = btrfs_file_extent_num_bytes(node, fi);
# 1315|-> 			ret = btrfs_del_csums(trans, csum_root, start, len);
# 1316|   			if (ret < 0)
# 1317|   				goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
btrfs-progs-v6.17.1/check/mode-common.c:1548:29: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1548:29: throw: if ‘btrfs_csum_root’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1548:29: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
# 1546|   		 * Above case we will have csum for [0, 4K) and that's valid.
# 1547|   		 */
# 1548|-> 		csum_root = btrfs_csum_root(gfs_info, key.objectid);
# 1549|   		ret = populate_csum(trans, csum_root, buf, key.objectid,
# 1550|   				    key.offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
btrfs-progs-v6.17.1/check/mode-common.c:1553:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1549:23: call_function: calling ‘populate_csum’ from ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1549:23: return_function: returning to ‘fill_csum_tree_from_extent’ from ‘populate_csum’
btrfs-progs-v6.17.1/check/mode-common.c:1551:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1553:61: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1553:23: throw: if ‘iterate_extent_inodes’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1553:23: danger: ‘buf’ leaks here; was allocated at [(4)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/3)
# 1551|   		if (ret < 0)
# 1552|   			break;
# 1553|-> 		ret = iterate_extent_inodes(trans->fs_info, key.objectid, 0, 0,
# 1554|   					    remove_csum_for_file_extent, trans);
# 1555|   		if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
btrfs-progs-v6.17.1/check/mode-common.c:1560:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1560:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/check/mode-common.c:1560:9: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
# 1558|   	}
# 1559|   
# 1560|-> 	btrfs_release_path(&path);
# 1561|   	free(buf);
# 1562|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
btrfs-progs-v6.17.1/check/mode-lowmem.c:596:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘key.offset’
btrfs-progs-v6.17.1/check/mode-lowmem.c:561:12: enter_function: entry to ‘delete_item’
btrfs-progs-v6.17.1/check/mode-lowmem.c:571:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-lowmem.c:572:23: call_function: inlined call to ‘PTR_ERR’ from ‘delete_item’
btrfs-progs-v6.17.1/check/mode-lowmem.c:595:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/check/mode-lowmem.c:596:17: branch_true: ...to here
btrfs-progs-v6.17.1/check/mode-lowmem.c:596:17: danger: use of uninitialized value ‘key.offset’ here
#  594|   	btrfs_commit_transaction(trans, root);
#  595|   	if (ret)
#  596|-> 		error("failed to delete root %llu item[%llu, %u, %llu]",
#  597|   		      root->objectid, key.objectid, key.type, key.offset);
#  598|   	else

Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
btrfs-progs-v6.17.1/check/mode-lowmem.c:1858:47: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘location.objectid’
btrfs-progs-v6.17.1/check/mode-lowmem.c:2642:12: enter_function: entry to ‘check_inode_item’
btrfs-progs-v6.17.1/check/mode-lowmem.c:2677:12: branch_false: following ‘false’ branch (when ‘inode_id != 18446744073709551611’)...
btrfs-progs-v6.17.1/check/mode-lowmem.c:2684:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-lowmem.c:2752:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-lowmem.c:2755:27: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-lowmem.c:2755:27: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-lowmem.c:2760:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-lowmem.c:2763:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-lowmem.c:2766:25: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-lowmem.c:2795:31: call_function: calling ‘check_dir_item’ from ‘check_inode_item’
# 1856|   		if (tmp_err && opt_check_repair) {
# 1857|   			ret = repair_dir_item(root, di_key,
# 1858|-> 					      location.objectid, index,
# 1859|   					      imode_to_type(mode), namebuf,
# 1860|   					      name_len, tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
btrfs-progs-v6.17.1/check/qgroup-verify.c:238:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ref’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1581:5: enter_function: entry to ‘print_extent_state’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1587:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1595:27: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1595:59: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1600:36: branch_true: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1599:23: call_function: calling ‘scan_extents’ from ‘print_extent_state’
#  236|   
#  237|   	rb_link_node(&ref->bytenr_node, parent, p);
#  238|-> 	rb_insert_color(&ref->bytenr_node, &by_bytenr);
#  239|   	return ref;
#  240|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
btrfs-progs-v6.17.1/check/repair.c:103:15: warning[-Wanalyzer-malloc-leak]: leak of ‘corrupt’
btrfs-progs-v6.17.1/check/repair.c:435:30: enter_function: entry to ‘btrfs_check_block_for_repair’
btrfs-progs-v6.17.1/check/repair.c:446:12: branch_false: following ‘false’ branch (when ‘status != 0’)...
btrfs-progs-v6.17.1/check/repair.c:449:13: call_function: inlined call to ‘btrfs_header_owner’ from ‘btrfs_check_block_for_repair’
btrfs-progs-v6.17.1/check/repair.c:449:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/repair.c:452:20: branch_true: ...to here
btrfs-progs-v6.17.1/check/repair.c:452:20: branch_true: following ‘true’ branch (when ‘first_key’ is non-NULL)...
btrfs-progs-v6.17.1/check/repair.c:453:25: branch_true: ...to here
btrfs-progs-v6.17.1/check/repair.c:456:17: call_function: calling ‘btrfs_add_corrupt_extent_record’ from ‘btrfs_check_block_for_repair’
#  101|   	corrupt->level = level;
#  102|   
#  103|-> 	ret = insert_cache_extent(info->corrupt_blocks, &corrupt->cache);
#  104|   	if (ret)
#  105|   		free(corrupt);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
btrfs-progs-v6.17.1/cmds/device.c:154:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*<unknown>, 2)’
btrfs-progs-v6.17.1/cmds/device.c:101:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:104:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:108:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:111:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:112:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:119:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:120:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/device.c:124:18: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:126:26: branch_true: following ‘true’ branch (when ‘i < last_dev’)...
btrfs-progs-v6.17.1/cmds/device.c:129:21: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:146:25: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/device.c:153:23: throw: if ‘btrfs_prepare_device’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:154:33: danger: ‘open(*<unknown>, 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  152|   
#  153|   		res = btrfs_prepare_device(devfd, argv[i], &dev_block_count, 0,
#  154|-> 				PREP_DEVICE_ZERO_END | PREP_DEVICE_VERBOSE |
#  155|   				(discard ? PREP_DEVICE_DISCARD : 0) |
#  156|   				(zoned ? PREP_DEVICE_ZONED : 0));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
btrfs-progs-v6.17.1/cmds/device.c:398:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/btrfs-control", 2)’
btrfs-progs-v6.17.1/cmds/device.c:392:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/device.c:393:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:396:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:397:12: branch_true: following ‘true’ branch (when ‘path’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:398:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:398:17: throw: if ‘strncpy_null’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:398:17: danger: ‘open("/dev/btrfs-control", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  396|   	memset(&args, 0, sizeof(args));
#  397|   	if (path)
#  398|-> 		strncpy_null(args.name, path, sizeof(args.name));
#  399|   	ret = ioctl(fd, BTRFS_IOC_FORGET_DEV, &args);
#  400|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
btrfs-progs-v6.17.1/cmds/device.c:544:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/btrfs-control", 2)’
btrfs-progs-v6.17.1/cmds/device.c:538:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/device.c:539:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:544:38: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:544:16: throw: if ‘path_canonicalize’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:544:38: danger: ‘open("/dev/btrfs-control", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  542|   	}
#  543|   
#  544|-> 	path = path_canonicalize(argv[optind]);
#  545|   	if (!path) {
#  546|   		error("could not canonicalize pathname '%s': %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
btrfs-progs-v6.17.1/cmds/device.c:782:9: warning[-Wanalyzer-malloc-leak]: leak of ‘di_args’
btrfs-progs-v6.17.1/cmds/device.c:777:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:782:9: throw: if ‘list_sort’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:782:9: danger: ‘di_args’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  780|   
#  781|   	i = 0;
#  782|-> 	list_sort(NULL, &fs_info->fs_devices->devices, cmp_device_id);
#  783|   	list_for_each_entry(cur_fs, fs_uuids, fs_list) {
#  784|   		if (memcmp(fs_info->fs_devices->fsid, cur_fs->fsid, BTRFS_FSID_SIZE) != 0)

Error: GCC_ANALYZER_WARNING (CWE-122): [#def34]
btrfs-progs-v6.17.1/cmds/device.c:788:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:788:25: danger: out-of-bounds write from byte 0 till byte 7 but region ends at byte 0
#  786|   
#  787|   		list_for_each_entry(device, &cur_fs->devices, dev_list) {
#  788|-> 			di_args[i].devid = device->devid;
#  789|   			memcpy(di_args[i].uuid, device->uuid, BTRFS_FSID_SIZE);
#  790|   			di_args[i].bytes_used = device->bytes_used;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def35]
btrfs-progs-v6.17.1/cmds/device.c:789:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:789:25: danger: out-of-bounds write from byte 8 till byte 23 but region ends at byte 0
#  787|   		list_for_each_entry(device, &cur_fs->devices, dev_list) {
#  788|   			di_args[i].devid = device->devid;
#  789|-> 			memcpy(di_args[i].uuid, device->uuid, BTRFS_FSID_SIZE);
#  790|   			di_args[i].bytes_used = device->bytes_used;
#  791|   			di_args[i].total_bytes = device->total_bytes;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def36]
btrfs-progs-v6.17.1/cmds/device.c:790:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:790:25: danger: out-of-bounds write from byte 24 till byte 31 but region ends at byte 0
#  788|   			di_args[i].devid = device->devid;
#  789|   			memcpy(di_args[i].uuid, device->uuid, BTRFS_FSID_SIZE);
#  790|-> 			di_args[i].bytes_used = device->bytes_used;
#  791|   			di_args[i].total_bytes = device->total_bytes;
#  792|   			memcpy(di_args[i].fsid, cur_fs->fsid, BTRFS_FSID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-122): [#def37]
btrfs-progs-v6.17.1/cmds/device.c:791:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:791:25: danger: out-of-bounds write from byte 32 till byte 39 but region ends at byte 0
#  789|   			memcpy(di_args[i].uuid, device->uuid, BTRFS_FSID_SIZE);
#  790|   			di_args[i].bytes_used = device->bytes_used;
#  791|-> 			di_args[i].total_bytes = device->total_bytes;
#  792|   			memcpy(di_args[i].fsid, cur_fs->fsid, BTRFS_FSID_SIZE);
#  793|   			/*

Error: GCC_ANALYZER_WARNING (CWE-122): [#def38]
btrfs-progs-v6.17.1/cmds/device.c:792:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:792:25: danger: out-of-bounds write from byte 40 till byte 55 but region ends at byte 0
#  790|   			di_args[i].bytes_used = device->bytes_used;
#  791|   			di_args[i].total_bytes = device->total_bytes;
#  792|-> 			memcpy(di_args[i].fsid, cur_fs->fsid, BTRFS_FSID_SIZE);
#  793|   			/*
#  794|   			 * File devices without loop device or a missing device

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
btrfs-progs-v6.17.1/cmds/device.c:798:33: warning[-Wanalyzer-malloc-leak]: leak of ‘di_args’
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:770:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:777:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/device.c:778:12: branch_false: following ‘false’ branch (when ‘di_args’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/device.c:782:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:783:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:784:55: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:787:17: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:788:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:797:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:798:54: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:798:33: throw: if ‘strncpy_null’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:798:33: danger: ‘di_args’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  796|   			 */
#  797|   			if (device->name)
#  798|-> 				strncpy_null((char *)di_args[i].path, device->name,
#  799|   					     BTRFS_DEVICE_PATH_NAME_MAX + 1);
#  800|   			i++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
btrfs-progs-v6.17.1/cmds/device.c:905:17: warning[-Wanalyzer-malloc-leak]: leak of ‘di_args’
btrfs-progs-v6.17.1/cmds/device.c:808:12: enter_function: entry to ‘cmd_device_stats’
btrfs-progs-v6.17.1/cmds/device.c:859:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:862:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:862:13: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/device.c:867:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:869:12: branch_true: following ‘true’ branch (when ‘opt_offline != 0’)...
btrfs-progs-v6.17.1/cmds/device.c:885:40: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:889:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:895:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:895:23: call_function: calling ‘get_fs_info_offline’ from ‘cmd_device_stats’
btrfs-progs-v6.17.1/cmds/device.c:895:23: return_function: returning to ‘cmd_device_stats’ from ‘get_fs_info_offline’
btrfs-progs-v6.17.1/cmds/device.c:896:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/device.c:1000:1: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/device.c:904:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/device.c:905:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/device.c:905:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/device.c:905:17: danger: ‘di_args’ leaks here; was allocated at [(12)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/11)
#  903|   
#  904|   	if (!fi_args.num_devices) {
#  905|-> 		error("no devices found");
#  906|   		err = 1;
#  907|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
btrfs-progs-v6.17.1/cmds/filesystem-du.c:250:9: warning[-Wanalyzer-malloc-leak]: leak of ‘si’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:576:12: enter_function: entry to ‘cmd_filesystem_du’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:604:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:607:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:618:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:39: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:23: call_function: calling ‘du_add_file’ from ‘cmd_filesystem_du’
#  248|   
#  249|   	rb_link_node(&si->i_node, parent, p);
#  250|-> 	rb_insert_color(&si->i_node, &seen_inodes);
#  251|   
#  252|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def42]
btrfs-progs-v6.17.1/cmds/filesystem-du.c:357:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
btrfs-progs-v6.17.1/cmds/filesystem-du.c:576:12: enter_function: entry to ‘cmd_filesystem_du’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:604:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:607:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:618:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:39: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:23: call_function: calling ‘du_add_file’ from ‘cmd_filesystem_du’
#  355|   		}
#  356|   
#  357|-> 		fiemap->fm_start = (fm_ext[i - 1].fe_logical +
#  358|   				    fm_ext[i - 1].fe_length);
#  359|   	} while (!last);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def43]
btrfs-progs-v6.17.1/cmds/filesystem-du.c:358:37: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
btrfs-progs-v6.17.1/cmds/filesystem-du.c:576:12: enter_function: entry to ‘cmd_filesystem_du’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:604:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:607:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:618:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:39: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:23: call_function: calling ‘du_add_file’ from ‘cmd_filesystem_du’
#  356|   
#  357|   		fiemap->fm_start = (fm_ext[i - 1].fe_logical +
#  358|-> 				    fm_ext[i - 1].fe_length);
#  359|   	} while (!last);
#  360|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
btrfs-progs-v6.17.1/cmds/filesystem-du.c:392:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dir.dirstream’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:576:12: enter_function: entry to ‘cmd_filesystem_du’
btrfs-progs-v6.17.1/cmds/filesystem-du.c:604:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:607:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:618:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:39: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-du.c:619:23: call_function: calling ‘du_add_file’ from ‘cmd_filesystem_du’
#  390|   
#  391|   		errno = 0;
#  392|-> 		entry = readdir(dirstream);
#  393|   		if (entry) {
#  394|   			if (strcmp(entry->d_name, ".") == 0

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:95:31: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1208:12: enter_function: entry to ‘cmd_filesystem_usage’
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1236:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1239:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1239:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1241:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1245:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1249:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1249:20: branch_false: following ‘false’ branch (when ‘more_than_one == 0’)...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1252:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1252:23: call_function: calling ‘load_chunk_and_device_info’ from ‘cmd_filesystem_usage’
#   93|   			p->num_stripes = num_stripes;
#   94|   
#   95|-> 			ret = array_append(chunkinfos, p);
#   96|   			if (ret < 0) {
#   97|   				error_mem(NULL);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def46]
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:220:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1208:12: enter_function: entry to ‘cmd_filesystem_usage’
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1236:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1239:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1239:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1241:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1245:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1249:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1249:20: branch_false: following ‘false’ branch (when ‘more_than_one == 0’)...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1252:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:1252:23: call_function: calling ‘load_chunk_and_device_info’ from ‘cmd_filesystem_usage’
#  218|   	}
#  219|   
#  220|-> 	qsort(chunkinfos->data, chunkinfos->length, sizeof(struct chunk_info *),
#  221|   	      cmp_chunk_info);
#  222|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:419:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:411:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:413:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:413:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:414:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:414:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:419:22: throw: if ‘readdir’ throws an exception...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:419:22: danger: ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  417|   	}
#  418|   	while (1) {
#  419|-> 		de = readdir(dir);
#  420|   		if (!de)
#  421|   			break;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def48]
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:432:9: warning[-Wanalyzer-null-argument]: use of NULL ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’ where non-null expected
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:411:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:413:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:413:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:414:12: release_memory: assuming ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’ is NULL
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:414:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:416:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:432:9: danger: argument 1 (‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’) NULL where non-null expected
#  430|   
#  431|   out:
#  432|-> 	closedir(dir);
#  433|   	return ret;
#  434|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:711:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:705:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:711:15: throw: if ‘btrfs_read_dev_super’ throws an exception...
btrfs-progs-v6.17.1/cmds/filesystem-usage.c:711:15: danger: ‘open(dev, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  709|   	}
#  710|   
#  711|-> 	ret = btrfs_read_dev_super(fd, &disk_super,
#  712|   				   BTRFS_SUPER_INFO_OFFSET, SBREAD_DEFAULT);
#  713|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
btrfs-progs-v6.17.1/cmds/filesystem.c:408:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&*tmp_dev_info.path, 0)’
btrfs-progs-v6.17.1/cmds/filesystem.c:379:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:381:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:381:17: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:384:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:395:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:398:77: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:401:22: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/filesystem.c:402:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:408:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:408:17: danger: ‘open(&*tmp_dev_info.path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  406|   
#  407|   		}
#  408|-> 		close(fd);
#  409|   		canonical_path = path_canonicalize((char *)tmp_dev_info->path);
#  410|   		pr_verbose(LOG_DEFAULT, "\tdevid %4llu size %s used %s path %s\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
btrfs-progs-v6.17.1/cmds/filesystem.c:467:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*mnt.mnt_dir, 0)’
btrfs-progs-v6.17.1/cmds/filesystem.c:434:12: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/filesystem.c:437:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:438:16: branch_true: following ‘true’ branch (when ‘mnt’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/filesystem.c:439:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:445:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:449:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:458:20: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/filesystem.c:461:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:466:22: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/filesystem.c:467:36: throw: if ‘get_df’ throws an exception...
btrfs-progs-v6.17.1/cmds/filesystem.c:467:36: danger: ‘open(*mnt.mnt_dir, 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  465|   
#  466|   		fd = open(mnt->mnt_dir, O_RDONLY);
#  467|-> 		if ((fd != -1) && !get_df(fd, &space_info_arg)) {
#  468|   			/* Put space between filesystem entries for readability. */
#  469|   			if (found != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
btrfs-progs-v6.17.1/cmds/filesystem.c:559:28: warning[-Wanalyzer-malloc-leak]: leak of ‘dev_copy’
btrfs-progs-v6.17.1/cmds/filesystem.c:547:12: enter_function: entry to ‘copy_fs_devices’
btrfs-progs-v6.17.1/cmds/filesystem.c:558:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:559:28: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:559:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/filesystem.c:560:20: branch_false: following ‘false’ branch (when ‘dev_copy’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/filesystem.c:565:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:565:23: call_function: calling ‘copy_device’ from ‘copy_fs_devices’
btrfs-progs-v6.17.1/cmds/filesystem.c:565:23: return_function: returning to ‘copy_fs_devices’ from ‘copy_device’
btrfs-progs-v6.17.1/cmds/filesystem.c:566:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:571:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:558:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:559:28: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:559:28: danger: ‘dev_copy’ leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#  557|   
#  558|   	list_for_each_entry(cur_dev, &src->devices, dev_list) {
#  559|-> 		dev_copy = malloc(sizeof(*dev_copy));
#  560|   		if (!dev_copy) {
#  561|   			ret = -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
btrfs-progs-v6.17.1/cmds/filesystem.c:640:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/cmds/filesystem.c:606:12: enter_function: entry to ‘search_umounted_fs_uuids’
btrfs-progs-v6.17.1/cmds/filesystem.c:619:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:621:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:629:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:632:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:633:20: branch_false: following ‘false’ branch (when ‘fs_copy’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/filesystem.c:638:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:638:23: call_function: calling ‘copy_fs_devices’ from ‘search_umounted_fs_uuids’
btrfs-progs-v6.17.1/cmds/filesystem.c:638:23: return_function: returning to ‘search_umounted_fs_uuids’ from ‘copy_fs_devices’
btrfs-progs-v6.17.1/cmds/filesystem.c:639:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:640:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:640:25: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/17)
#  638|   		ret = copy_fs_devices(fs_copy, cur_fs);
#  639|   		if (ret) {
#  640|-> 			free(fs_copy);
#  641|   			goto out;
#  642|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
btrfs-progs-v6.17.1/cmds/filesystem.c:978:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fpath, (int)defrag_open_mode)’
btrfs-progs-v6.17.1/cmds/filesystem.c:1013:12: enter_function: entry to ‘defrag_callback’
btrfs-progs-v6.17.1/cmds/filesystem.c:1021:22: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/filesystem.c:1022:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:1025:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:1025:23: call_function: calling ‘defrag_range_in_steps’ from ‘defrag_callback’
#  976|   	struct btrfs_ioctl_defrag_range_args range;
#  977|   
#  978|-> 	if (defrag_global_step == 0)
#  979|   		return ioctl(fd, BTRFS_IOC_DEFRAG_RANGE, &defrag_global_range);
#  980|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def55]
btrfs-progs-v6.17.1/cmds/filesystem.c:2085:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘sysfs_open_fsid_file(btrfs_open_dir(*<unknown>), "commit_stats")’
btrfs-progs-v6.17.1/cmds/filesystem.c:2012:17: branch_true: following ‘true’ branch (when ‘c == 122’)...
btrfs-progs-v6.17.1/cmds/filesystem.c:2012:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2021:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:2024:33: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2025:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:2028:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2029:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:2034:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2035:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/filesystem.c:2040:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2075:12: branch_true: following ‘true’ branch (when ‘opt_reset != 0’)...
btrfs-progs-v6.17.1/cmds/filesystem.c:2076:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/filesystem.c:2076:17: release_resource: first ‘close’ here
btrfs-progs-v6.17.1/cmds/filesystem.c:2085:9: danger: second ‘close’ here; first ‘close’ was at [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12)
# 2083|   
# 2084|   out:
# 2085|-> 	close(sysfs_fd);
# 2086|   	close(fd);
# 2087|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
btrfs-progs-v6.17.1/cmds/inspect.c:212:23: warning[-Wanalyzer-malloc-leak]: leak of ‘inodes’
btrfs-progs-v6.17.1/cmds/inspect.c:200:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:203:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:204:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:205:12: branch_false: following ‘false’ branch (when ‘inodes’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:205:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:212:23: throw: if ‘arg_strtou64’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:212:23: danger: ‘inodes’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  210|   
#  211|   	memset(inodes, 0, sizeof(*inodes));
#  212|-> 	loi.logical = arg_strtou64(argv[optind]);
#  213|   	loi.size = size;
#  214|   	loi.flags = flags;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
btrfs-progs-v6.17.1/cmds/inspect.c:217:14: warning[-Wanalyzer-malloc-leak]: leak of ‘inodes’
btrfs-progs-v6.17.1/cmds/inspect.c:200:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:203:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:204:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:205:12: branch_false: following ‘false’ branch (when ‘inodes’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:205:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:217:14: throw: if ‘btrfs_open_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:217:14: danger: ‘inodes’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  215|   	loi.inodes = ptr_to_u64(inodes);
#  216|   
#  217|-> 	fd = btrfs_open_dir(argv[optind + 1]);
#  218|   	if (fd < 0) {
#  219|   		ret = 12;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
btrfs-progs-v6.17.1/cmds/inspect.c:436:1: warning[-Wanalyzer-malloc-leak]: leak of ‘e’
btrfs-progs-v6.17.1/cmds/inspect.c:553:12: enter_function: entry to ‘print_min_dev_size’
btrfs-progs-v6.17.1/cmds/inspect.c:588:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:594:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:594:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:594:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:604:34: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘print_min_dev_size’
btrfs-progs-v6.17.1/cmds/inspect.c:611:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:614:31: call_function: inlined call to ‘btrfs_stack_dev_extent_length’ from ‘print_min_dev_size’
btrfs-progs-v6.17.1/cmds/inspect.c:616:31: call_function: calling ‘add_dev_extent’ from ‘print_min_dev_size’
#  434|   
#  435|   	return 0;
#  436|-> }
#  437|   
#  438|   static void free_dev_extent_list(struct list_head *list)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
btrfs-progs-v6.17.1/cmds/inspect.c:611:28: warning[-Wanalyzer-malloc-leak]: leak of ‘e’
btrfs-progs-v6.17.1/cmds/inspect.c:553:12: enter_function: entry to ‘print_min_dev_size’
btrfs-progs-v6.17.1/cmds/inspect.c:588:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:594:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:594:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:594:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:604:34: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘print_min_dev_size’
btrfs-progs-v6.17.1/cmds/inspect.c:611:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:611:28: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:616:31: call_function: calling ‘add_dev_extent’ from ‘print_min_dev_size’
#  609|   			sk->min_offset = sh.offset + 1;
#  610|   
#  611|-> 			if (sh.objectid != devid || sh.type != BTRFS_DEV_EXTENT_KEY)
#  612|   				continue;
#  613|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
btrfs-progs-v6.17.1/cmds/inspect.c:908:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1187:15: call_function: calling ‘print_list_chunks’ from ‘cmd_inspect_list_chunks’
#  906|   	int id;
#  907|   
#  908|-> 	compare_init(&comp, sortit);
#  909|   
#  910|   	tmp = sortmode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
btrfs-progs-v6.17.1/cmds/inspect.c:914:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1187:15: call_function: calling ‘print_list_chunks’ from ‘cmd_inspect_list_chunks’
#  912|   		bool descending;
#  913|   
#  914|-> 		id = compare_parse_key_to_id(&comp, &tmp, &descending);
#  915|   		if (id == -1) {
#  916|   			error("unknown sort key: %s", tmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
btrfs-progs-v6.17.1/cmds/inspect.c:916:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1187:15: call_function: calling ‘print_list_chunks’ from ‘cmd_inspect_list_chunks’
#  914|   		id = compare_parse_key_to_id(&comp, &tmp, &descending);
#  915|   		if (id == -1) {
#  916|-> 			error("unknown sort key: %s", tmp);
#  917|   			return 1;
#  918|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
btrfs-progs-v6.17.1/cmds/inspect.c:919:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1187:15: call_function: calling ‘print_list_chunks’ from ‘cmd_inspect_list_chunks’
#  917|   			return 1;
#  918|   		}
#  919|-> 		compare_add_sort_id(&comp, id, descending);
#  920|   	} while (id >= 0);
#  921|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
btrfs-progs-v6.17.1/cmds/inspect.c:926:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1187:15: call_function: calling ‘print_list_chunks’ from ‘cmd_inspect_list_chunks’
#  924|   	 * them once to find the physical ordering. This is the default mode.
#  925|   	 */
#  926|-> 	qsort(ctx->stats, ctx->length, sizeof(ctx->stats[0]), cmp_cse_devid_pstart);
#  927|   	devid = 0;
#  928|   	number = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
btrfs-progs-v6.17.1/cmds/inspect.c:1070:25: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1070:25: throw: if ‘usage_unknown_option’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1070:25: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
# 1068|   			break;
# 1069|   		default:
# 1070|-> 			usage_unknown_option(cmd, argv);
# 1071|   		}
# 1072|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
# 1072|   	}
# 1073|   
# 1074|-> 	if (check_argc_exact(argc - optind, 1))
# 1075|   		return 1;
# 1076|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
btrfs-progs-v6.17.1/cmds/inspect.c:1080:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1080:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1080:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1080:17: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
# 1078|   	if (!ctx.stats) {
# 1079|   		ret = 1;
# 1080|-> 		error_mem(NULL);
# 1081|   		goto out;
# 1082|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: throw: if ‘btrfs_open_file_or_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: danger: ‘ctx.stats’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
# 1084|   	path = argv[optind];
# 1085|   
# 1086|-> 	fd = btrfs_open_file_or_dir(path);
# 1087|   	if (fd < 0) {
# 1088|   		ret = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: throw: if ‘btrfs_open_file_or_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1086:14: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
# 1084|   	path = argv[optind];
# 1085|   
# 1086|-> 	fd = btrfs_open_file_or_dir(path);
# 1087|   	if (fd < 0) {
# 1088|   		ret = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_true: following ‘true’ branch (when ‘lnumber’ is NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: danger: ‘ctx.stats’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
# 1102|   	if (!lnumber) {
# 1103|   		ret = 1;
# 1104|-> 		error_mem(NULL);
# 1105|   		goto out;
# 1106|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_true: following ‘true’ branch (when ‘lnumber’ is NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1104:17: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
# 1102|   	if (!lnumber) {
# 1103|   		ret = 1;
# 1104|-> 		error_mem(NULL);
# 1105|   		goto out;
# 1106|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: throw: if ‘btrfs_tree_search_ioctl’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: danger: ‘ctx.stats’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
# 1108|   	while (1) {
# 1109|   		sk->nr_items = 1;
# 1110|-> 		ret = btrfs_tree_search_ioctl(fd, &args);
# 1111|   		if (ret < 0) {
# 1112|   			error("cannot perform the search: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: warning[-Wanalyzer-malloc-leak]: leak of ‘lnumber’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1101:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: throw: if ‘btrfs_tree_search_ioctl’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: danger: ‘lnumber’ leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
# 1108|   	while (1) {
# 1109|   		sk->nr_items = 1;
# 1110|-> 		ret = btrfs_tree_search_ioctl(fd, &args);
# 1111|   		if (ret < 0) {
# 1112|   			error("cannot perform the search: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: throw: if ‘btrfs_tree_search_ioctl’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1110:23: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
# 1108|   	while (1) {
# 1109|   		sk->nr_items = 1;
# 1110|-> 		ret = btrfs_tree_search_ioctl(fd, &args);
# 1111|   		if (ret < 0) {
# 1112|   			error("cannot perform the search: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.stats’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: danger: ‘ctx.stats’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
# 1110|   		ret = btrfs_tree_search_ioctl(fd, &args);
# 1111|   		if (ret < 0) {
# 1112|-> 			error("cannot perform the search: %m");
# 1113|   			goto out;
# 1114|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: warning[-Wanalyzer-malloc-leak]: leak of ‘sortmode’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1064:17: branch_true: following ‘true’ branch (when ‘c == 256’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1065:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1067:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1112:25: danger: ‘sortmode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
# 1110|   		ret = btrfs_tree_search_ioctl(fd, &args);
# 1111|   		if (ret < 0) {
# 1112|-> 			error("cannot perform the search: %m");
# 1113|   			goto out;
# 1114|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: warning[-Wanalyzer-malloc-leak]: leak of ‘e’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1126:37: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1128:32: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1132:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1136:38: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1144:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1148:41: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1150:44: branch_true: following ‘true’ branch (when ‘tmp’ is NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: danger: ‘e’ leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5)
# 1150|   					if (!tmp) {
# 1151|   						ret = 1;
# 1152|-> 						error_mem(NULL);
# 1153|   						goto out;
# 1154|   					}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: warning[-Wanalyzer-malloc-leak]: leak of ‘lnumber’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1126:37: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1128:32: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1132:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1136:38: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1144:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1148:41: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1149:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1150:44: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1155:62: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1144:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1148:41: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1150:44: branch_true: following ‘true’ branch (when ‘tmp’ is NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/cmds/inspect.c:1152:49: danger: ‘lnumber’ leaks here; was allocated at [(26)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/25)
# 1150|   					if (!tmp) {
# 1151|   						ret = 1;
# 1152|-> 						error_mem(NULL);
# 1153|   						goto out;
# 1154|   					}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
btrfs-progs-v6.17.1/cmds/inspect.c:1155:41: warning[-Wanalyzer-malloc-leak]: leak of ‘lnumber’
btrfs-progs-v6.17.1/cmds/inspect.c:1028:12: enter_function: entry to ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1061:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1074:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1074:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1077:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1084:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1087:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1092:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: following ‘false’ branch (when ‘lnumber’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1102:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1111:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1115:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1126:37: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1128:32: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘cmd_inspect_list_chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1132:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1136:38: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1144:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1148:41: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1149:47: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/inspect.c:1150:44: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1155:62: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1144:40: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1148:41: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1150:44: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/inspect.c:1155:62: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1155:41: danger: ‘lnumber’ leaks here; was allocated at [(26)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/25)
# 1153|   						goto out;
# 1154|   					}
# 1155|-> 					memcpy(tmp, lnumber, sizeof(u64) * old_size);
# 1156|   					lnumber = tmp;
# 1157|   				}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
btrfs-progs-v6.17.1/cmds/inspect.c:1287:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/cmds/inspect.c:1511:12: enter_function: entry to ‘cmd_inspect_map_swapfile’
btrfs-progs-v6.17.1/cmds/inspect.c:1543:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1546:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1547:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1554:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1555:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1560:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1560:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1566:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1567:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1572:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1572:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1577:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1577:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1583:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1583:15: call_function: calling ‘read_chunk_tree’ from ‘cmd_inspect_map_swapfile’
# 1285|   			else
# 1286|   				capacity *= 2;
# 1287|-> 			tmp = realloc(*chunks, capacity * sizeof(**chunks));
# 1288|   			if (!tmp) {
# 1289|   				perror("realloc");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
btrfs-progs-v6.17.1/cmds/inspect.c:1326:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunks’
btrfs-progs-v6.17.1/cmds/inspect.c:1511:12: enter_function: entry to ‘cmd_inspect_map_swapfile’
btrfs-progs-v6.17.1/cmds/inspect.c:1543:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1546:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1547:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1554:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1555:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1560:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1560:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1566:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1567:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
btrfs-progs-v6.17.1/cmds/inspect.c:1572:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1572:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1577:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1577:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/inspect.c:1583:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/inspect.c:1583:15: call_function: calling ‘read_chunk_tree’ from ‘cmd_inspect_map_swapfile’
# 1324|   	}
# 1325|   	return 0;
# 1326|-> }
# 1327|   
# 1328|   static struct chunk *find_chunk(struct chunk *chunks, size_t num_chunks, u64 logical)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
btrfs-progs-v6.17.1/cmds/property.c:207:25: warning[-Wanalyzer-malloc-leak]: leak of ‘xattr_name’
btrfs-progs-v6.17.1/cmds/property.c:185:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:190:54: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:190:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:191:12: branch_false: following ‘false’ branch (when ‘xattr_name’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:195:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:204:12: branch_true: following ‘true’ branch (when ‘sret < 0’)...
btrfs-progs-v6.17.1/cmds/property.c:205:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:206:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/property.c:207:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:207:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:207:25: danger: ‘xattr_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  205|   		ret = -errno;
#  206|   		if (ret != -ENOATTR)
#  207|-> 			error("failed to %s compression for %s: %m",
#  208|   			      value ? "set" : "get", object);
#  209|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
btrfs-progs-v6.17.1/cmds/property.c:224:25: warning[-Wanalyzer-malloc-leak]: leak of ‘xattr_name’
btrfs-progs-v6.17.1/cmds/property.c:185:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:190:54: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:190:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:191:12: branch_false: following ‘false’ branch (when ‘xattr_name’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:195:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:199:12: branch_false: following ‘false’ branch (when ‘value’ is NULL)...
btrfs-progs-v6.17.1/cmds/property.c:202:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:204:12: branch_false: following ‘false’ branch (when ‘sret >= 0’)...
btrfs-progs-v6.17.1/cmds/property.c:213:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:213:12: branch_true: following ‘true’ branch (when ‘value’ is NULL)...
btrfs-progs-v6.17.1/cmds/property.c:214:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:217:20: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:221:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:222:20: branch_true: following ‘true’ branch (when ‘sret < 0’)...
btrfs-progs-v6.17.1/cmds/property.c:223:32: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:224:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:224:25: danger: ‘xattr_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  222|   		if (sret < 0) {
#  223|   			ret = -errno;
#  224|-> 			error("failed to get compression for %s: %m", object);
#  225|   			goto out;
#  226|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
btrfs-progs-v6.17.1/cmds/property.c:227:17: warning[-Wanalyzer-malloc-leak]: leak of ‘xattr_name’
btrfs-progs-v6.17.1/cmds/property.c:185:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:190:54: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:190:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:191:12: branch_false: following ‘false’ branch (when ‘xattr_name’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:195:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:199:12: branch_false: following ‘false’ branch (when ‘value’ is NULL)...
btrfs-progs-v6.17.1/cmds/property.c:202:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:204:12: branch_false: following ‘false’ branch (when ‘sret >= 0’)...
btrfs-progs-v6.17.1/cmds/property.c:213:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:213:12: branch_true: following ‘true’ branch (when ‘value’ is NULL)...
btrfs-progs-v6.17.1/cmds/property.c:214:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:217:20: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:221:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:222:20: branch_false: following ‘false’ branch (when ‘sret >= 0’)...
btrfs-progs-v6.17.1/cmds/property.c:227:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:227:17: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:227:17: danger: ‘xattr_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  225|   			goto out;
#  226|   		}
#  227|-> 		pr_verbose(LOG_DEFAULT, "compression=%.*s\n", (int)len, buf);
#  228|   	}
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
btrfs-progs-v6.17.1/cmds/property.c:339:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/cmds/property.c:320:12: branch_false: following ‘false’ branch (when ‘rp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:324:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/cmds/property.c:329:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:329:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:330:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:334:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:339:15: throw: if ‘get_fsid’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:339:15: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  337|   	strcat(tmp, "..");
#  338|   
#  339|-> 	ret = get_fsid(object, fsid, 0);
#  340|   	if (ret < 0) {
#  341|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
btrfs-progs-v6.17.1/cmds/property.c:342:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/cmds/property.c:320:12: branch_false: following ‘false’ branch (when ‘rp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:324:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/cmds/property.c:329:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:329:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:330:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:334:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:340:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/property.c:341:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:342:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:342:17: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  340|   	if (ret < 0) {
#  341|   		errno = -ret;
#  342|-> 		error("get_fsid for %s failed: %m", object);
#  343|   		goto out;
#  344|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
btrfs-progs-v6.17.1/cmds/property.c:346:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/cmds/property.c:320:12: branch_false: following ‘false’ branch (when ‘rp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:324:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/cmds/property.c:329:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:329:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:330:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:334:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:340:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:346:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:346:15: throw: if ‘get_fsid’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:346:15: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  344|   	}
#  345|   
#  346|-> 	ret = get_fsid(tmp, fsid2, 1);
#  347|   	if (ret == -ENOTTY) {
#  348|   		ret = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
btrfs-progs-v6.17.1/cmds/property.c:355:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/cmds/property.c:320:12: branch_false: following ‘false’ branch (when ‘rp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:324:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/cmds/property.c:329:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:329:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/property.c:330:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/property.c:334:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:340:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:346:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:347:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:350:19: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:350:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/property.c:353:19: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/property.c:353:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/property.c:354:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/property.c:355:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/property.c:355:17: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  353|   	} else if (ret < 0) {
#  354|   		errno = -ret;
#  355|-> 		error("get_fsid for %s failed: %m", tmp);
#  356|   		goto out;
#  357|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
btrfs-progs-v6.17.1/cmds/property.c:563:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘name’
btrfs-progs-v6.17.1/cmds/property.c:662:12: enter_function: entry to ‘cmd_property_list’
btrfs-progs-v6.17.1/cmds/property.c:670:13: call_function: calling ‘parse_args’ from ‘cmd_property_list’
#  561|   	*object = argv[optind++];
#  562|   	if (optind < argc)
#  563|-> 		*name = argv[optind++];
#  564|   	if (optind < argc)
#  565|   		*value = argv[optind++];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def90]
btrfs-progs-v6.17.1/cmds/property.c:565:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
btrfs-progs-v6.17.1/cmds/property.c:600:12: enter_function: entry to ‘cmd_property_get’
btrfs-progs-v6.17.1/cmds/property.c:609:13: call_function: calling ‘parse_args’ from ‘cmd_property_get’
#  563|   		*name = argv[optind++];
#  564|   	if (optind < argc)
#  565|-> 		*value = argv[optind++];
#  566|   
#  567|   	if (!*types) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
btrfs-progs-v6.17.1/cmds/qgroup.c:665:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
#  663|   	set = calloc(1, size);
#  664|   	if (!set) {
#  665|-> 		error_mem(NULL);
#  666|   		exit(1);
#  667|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
btrfs-progs-v6.17.1/cmds/qgroup.c:770:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:1638:12: enter_function: entry to ‘show_qgroups’
btrfs-progs-v6.17.1/cmds/qgroup.c:1647:15: call_function: calling ‘qgroups_search_all’ from ‘show_qgroups’
#  768|   	}
#  769|   	rb_link_node(&ins->rb_node, parent, p);
#  770|-> 	rb_insert_color(&ins->rb_node, &root_tree->root);
#  771|   	return 0;
#  772|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: throw: if ‘btrfs_util_subvolume_get_path_fd’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: danger: ‘bq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  836|   		char *path;
#  837|   
#  838|-> 		uret = btrfs_util_subvolume_get_path_fd(fd, qgroupid, &path);
#  839|   		if (uret == BTRFS_UTIL_OK)
#  840|   			bq->path = path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
btrfs-progs-v6.17.1/cmds/qgroup.c:842:25: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:839:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:842:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:842:25: throw: if ‘btrfs_util_strerror’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:842:25: danger: ‘bq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  840|   			bq->path = path;
#  841|   		else if (uret != BTRFS_UTIL_ERROR_SUBVOLUME_NOT_FOUND) {
#  842|-> 			error("%s", btrfs_util_strerror(uret));
#  843|   			if (uret == BTRFS_UTIL_ERROR_NO_MEMORY)
#  844|   				return ERR_PTR(-ENOMEM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
btrfs-progs-v6.17.1/cmds/qgroup.c:844:40: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:839:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:842:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:844:40: danger: ‘bq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  842|   			error("%s", btrfs_util_strerror(uret));
#  843|   			if (uret == BTRFS_UTIL_ERROR_NO_MEMORY)
#  844|-> 				return ERR_PTR(-ENOMEM);
#  845|   			else
#  846|   				return ERR_PTR(-EIO);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
btrfs-progs-v6.17.1/cmds/qgroup.c:855:24: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:839:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:855:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:855:24: throw: if ‘btrfs_util_subvolume_get_info_fd’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:855:24: danger: ‘bq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  853|   		 * for the ROOT_ITEM.
#  854|   		 */
#  855|-> 		uret = btrfs_util_subvolume_get_info_fd(fd, qgroupid, NULL);
#  856|   		if (uret == BTRFS_UTIL_OK) {
#  857|   			bq->stale = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
btrfs-progs-v6.17.1/cmds/qgroup.c:861:25: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:838:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:839:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:841:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:855:24: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:856:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:858:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:858:27: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:861:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:861:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:861:25: danger: ‘bq’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  859|   			bq->stale = true;
#  860|   		} else {
#  861|-> 			warning("failed to search root item for qgroup %u/%llu, assuming it not stale",
#  862|   				btrfs_qgroup_level(qgroupid),
#  863|   				btrfs_qgroup_subvolid(qgroupid));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
btrfs-progs-v6.17.1/cmds/qgroup.c:871:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bq’
btrfs-progs-v6.17.1/cmds/qgroup.c:813:29: enter_function: entry to ‘get_or_add_qgroup’
btrfs-progs-v6.17.1/cmds/qgroup.c:823:14: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:824:12: branch_false: following ‘false’ branch (when ‘bq’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:829:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:834:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:868:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:868:15: call_function: calling ‘qgroup_tree_insert’ from ‘get_or_add_qgroup’
btrfs-progs-v6.17.1/cmds/qgroup.c:868:15: return_function: returning to ‘get_or_add_qgroup’ from ‘qgroup_tree_insert’
btrfs-progs-v6.17.1/cmds/qgroup.c:869:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:870:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:871:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:871:17: danger: ‘bq’ leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  869|   	if (ret) {
#  870|   		errno = -ret;
#  871|-> 		error("failed to insert %llu into tree: %m", bq->qgroupid);
#  872|   		free(bq);
#  873|   		return ERR_PTR(ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
btrfs-progs-v6.17.1/cmds/qgroup.c:1361:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2068:15: call_function: calling ‘show_qgroups’ from ‘cmd_qgroup_show’
# 1359|   
# 1360|   	while (1) {
# 1361|-> 		ret = btrfs_tree_search_ioctl(fd, args);
# 1362|   		if (ret < 0) {
# 1363|   			if (errno == ENOENT)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
btrfs-progs-v6.17.1/cmds/qgroup.c:1361:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2068:15: call_function: calling ‘show_qgroups’ from ‘cmd_qgroup_show’
# 1359|   
# 1360|   	while (1) {
# 1361|-> 		ret = btrfs_tree_search_ioctl(fd, args);
# 1362|   		if (ret < 0) {
# 1363|   			if (errno == ENOENT)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: throw: if ‘get_unit_mode_from_arg’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
# 1974|   	comparer_set = qgroup_alloc_comparer_set();
# 1975|   
# 1976|-> 	unit_mode = get_unit_mode_from_arg(&argc, argv, 0);
# 1977|   
# 1978|   	optind = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: throw: if ‘get_unit_mode_from_arg’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:1976:21: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/3)
# 1974|   	comparer_set = qgroup_alloc_comparer_set();
# 1975|   
# 1976|-> 	unit_mode = get_unit_mode_from_arg(&argc, argv, 0);
# 1977|   
# 1978|   	optind = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2015:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2016:33: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
# 2015|   			if (ret < 0) {
# 2016|   				errno = -ret;
# 2017|-> 				error("cannot parse sort string: %m");
# 2018|   				return 1;
# 2019|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2015:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2016:33: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2017:33: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/3)
# 2015|   			if (ret < 0) {
# 2016|   				errno = -ret;
# 2017|-> 				error("cannot parse sort string: %m");
# 2018|   				return 1;
# 2019|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
btrfs-progs-v6.17.1/cmds/qgroup.c:2018:40: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2018:40: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
# 2016|   				errno = -ret;
# 2017|   				error("cannot parse sort string: %m");
# 2018|-> 				return 1;
# 2019|   			}
# 2020|   			if (ret > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
btrfs-progs-v6.17.1/cmds/qgroup.c:2018:40: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2018:40: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/3)
# 2016|   				errno = -ret;
# 2017|   				error("cannot parse sort string: %m");
# 2018|-> 				return 1;
# 2019|   			}
# 2020|   			if (ret > 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2014:31: call_function: calling ‘qgroup_parse_sort_string’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:2014:31: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_parse_sort_string’
btrfs-progs-v6.17.1/cmds/qgroup.c:2015:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2020:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2020:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
# 2019|   			}
# 2020|   			if (ret > 0) {
# 2021|-> 				error("unrecognized format of sort string");
# 2022|   				return 1;
# 2023|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2014:31: call_function: calling ‘qgroup_parse_sort_string’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:2014:31: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_parse_sort_string’
btrfs-progs-v6.17.1/cmds/qgroup.c:2015:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2020:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2020:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2021:33: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/3)
# 2019|   			}
# 2020|   			if (ret > 0) {
# 2021|-> 				error("unrecognized format of sort string");
# 2022|   				return 1;
# 2023|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: throw: if ‘usage_unknown_option’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8)
# 2027|   			break;
# 2028|   		default:
# 2029|-> 			usage_unknown_option(cmd, argv);
# 2030|   		}
# 2031|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1992:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1994:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: throw: if ‘usage_unknown_option’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2029:25: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/3)
# 2027|   			break;
# 2028|   		default:
# 2029|-> 			usage_unknown_option(cmd, argv);
# 2030|   		}
# 2031|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8)
# 2032|   	qgroup_setup_units(unit_mode);
# 2033|   
# 2034|-> 	if (check_argc_exact(argc - optind, 1))
# 2035|   		return 1;
# 2036|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:13: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/3)
# 2032|   	qgroup_setup_units(unit_mode);
# 2033|   
# 2034|-> 	if (check_argc_exact(argc - optind, 1))
# 2035|   		return 1;
# 2036|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: throw: if ‘btrfs_open_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8)
# 2036|   
# 2037|   	path = argv[optind];
# 2038|-> 	fd = btrfs_open_dir(path);
# 2039|   	if (fd < 0) {
# 2040|   		free(filter_set);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: throw: if ‘btrfs_open_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2038:14: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/3)
# 2036|   
# 2037|   	path = argv[optind];
# 2038|-> 	fd = btrfs_open_dir(path);
# 2039|   	if (fd < 0) {
# 2040|   		free(filter_set);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_true: following ‘true’ branch (when ‘sync != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: throw: if ‘btrfs_util_fs_sync_fd’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/8)
# 2044|   
# 2045|   	if (sync) {
# 2046|-> 		err = btrfs_util_fs_sync_fd(fd);
# 2047|   		if (err)
# 2048|   			warning("sync ioctl failed on '%s': %m", path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_true: following ‘true’ branch (when ‘sync != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: throw: if ‘btrfs_util_fs_sync_fd’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/3)
# 2044|   
# 2045|   	if (sync) {
# 2046|-> 		err = btrfs_util_fs_sync_fd(fd);
# 2047|   		if (err)
# 2048|   			warning("sync ioctl failed on '%s': %m", path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_true: following ‘true’ branch (when ‘sync != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2047:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/8)
# 2046|   		err = btrfs_util_fs_sync_fd(fd);
# 2047|   		if (err)
# 2048|-> 			warning("sync ioctl failed on '%s': %m", path);
# 2049|   	}
# 2050|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_true: following ‘true’ branch (when ‘sync != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2046:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2047:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2048:25: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/3)
# 2046|   		err = btrfs_util_fs_sync_fd(fd);
# 2047|   		if (err)
# 2048|-> 			warning("sync ioctl failed on '%s': %m", path);
# 2049|   	}
# 2050|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: throw: if ‘lookup_path_rootid’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/8)
# 2050|   
# 2051|   	if (filter_flag) {
# 2052|-> 		ret = lookup_path_rootid(fd, &qgroupid);
# 2053|   		if (ret < 0) {
# 2054|   			errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: throw: if ‘lookup_path_rootid’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/3)
# 2050|   
# 2051|   	if (filter_flag) {
# 2052|-> 		ret = lookup_path_rootid(fd, &qgroupid);
# 2053|   		if (ret < 0) {
# 2054|   			errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2053:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2054:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/8)
# 2053|   		if (ret < 0) {
# 2054|   			errno = -ret;
# 2055|-> 			error("cannot resolve rootid for %s: %m", path);
# 2056|   			close(fd);
# 2057|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2053:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2054:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2055:25: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/3)
# 2053|   		if (ret < 0) {
# 2054|   			errno = -ret;
# 2055|-> 			error("cannot resolve rootid for %s: %m", path);
# 2056|   			close(fd);
# 2057|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2053:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2054:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/8)
# 2054|   			errno = -ret;
# 2055|   			error("cannot resolve rootid for %s: %m", path);
# 2056|-> 			close(fd);
# 2057|   			goto out;
# 2058|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1961:12: enter_function: entry to ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: call_function: calling ‘qgroup_alloc_filter_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1973:22: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: call_function: calling ‘qgroup_alloc_comparer_set’ from ‘cmd_qgroup_show’
btrfs-progs-v6.17.1/cmds/qgroup.c:1974:24: return_function: returning to ‘cmd_qgroup_show’ from ‘qgroup_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/qgroup.c:2034:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2037:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2045:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2051:12: branch_true: following ‘true’ branch (when ‘filter_flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:2052:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2053:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:2054:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/qgroup.c:2056:25: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/3)
# 2054|   			errno = -ret;
# 2055|   			error("cannot resolve rootid for %s: %m", path);
# 2056|-> 			close(fd);
# 2057|   			goto out;
# 2058|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
btrfs-progs-v6.17.1/cmds/quota.c:380:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(sysfs_open_fsid_dir(btrfs_open_dir(argv[1]), "qgroups"))’
btrfs-progs-v6.17.1/cmds/quota.c:305:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/quota.c:315:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:315:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:318:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:319:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:322:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:324:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:328:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:335:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:351:47: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:354:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:358:73: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:361:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:365:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:368:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/quota.c:369:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/quota.c:373:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/quota.c:380:22: throw: if ‘readdir’ throws an exception...
btrfs-progs-v6.17.1/cmds/quota.c:380:22: danger: ‘fdopendir(sysfs_open_fsid_dir(btrfs_open_dir(argv[1]), "qgroups"))’ leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  378|   		char *str;
#  379|   
#  380|-> 		de = readdir(dir);
#  381|   		if (!de)
#  382|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
btrfs-progs-v6.17.1/cmds/receive.c:366:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor
btrfs-progs-v6.17.1/cmds/receive.c:243:12: enter_function: entry to ‘process_snapshot’
btrfs-progs-v6.17.1/cmds/receive.c:257:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:263:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:263:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:270:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:282:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:287:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:307:13: call_function: inlined call to ‘IS_ERR_OR_NULL’ from ‘process_snapshot’
btrfs-progs-v6.17.1/cmds/receive.c:322:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:358:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:359:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:359:30: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/receive.c:363:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:364:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:365:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:366:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:366:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/receive.c:366:25: danger: leaks here; was opened at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#  364|   		ret = -errno;
#  365|   		if (errno != ENOENT)
#  366|-> 			error("cannot open %s: %m", parent_subvol->path);
#  367|   		else
#  368|   			fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
btrfs-progs-v6.17.1/cmds/receive.c:390:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor
btrfs-progs-v6.17.1/cmds/receive.c:243:12: enter_function: entry to ‘process_snapshot’
btrfs-progs-v6.17.1/cmds/receive.c:257:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:263:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:263:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:270:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:282:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:287:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:307:13: call_function: inlined call to ‘IS_ERR_OR_NULL’ from ‘process_snapshot’
btrfs-progs-v6.17.1/cmds/receive.c:322:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:358:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:359:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:359:30: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/receive.c:363:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:364:24: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:365:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:368:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:390:16: danger: leaks here; was opened at [(16)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/15)
#  388|   		free(parent_subvol);
#  389|   	}
#  390|-> 	return ret;
#  391|   }
#  392|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
btrfs-progs-v6.17.1/cmds/receive.c:414:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘creat(&full_path, 384)’
btrfs-progs-v6.17.1/cmds/receive.c:400:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:405:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:408:15: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/receive.c:409:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:414:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:414:9: danger: ‘creat(&full_path, 384)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  412|   		goto out;
#  413|   	}
#  414|-> 	close(ret);
#  415|   	ret = 0;
#  416|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
btrfs-progs-v6.17.1/cmds/receive.c:687:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&full_path, 0)’
btrfs-progs-v6.17.1/cmds/receive.c:1380:12: enter_function: entry to ‘process_enable_verity’
btrfs-progs-v6.17.1/cmds/receive.c:1399:12: branch_false: following ‘false’ branch (when ‘sig_len == 0’)...
btrfs-progs-v6.17.1/cmds/receive.c:1404:39: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1405:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1410:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1410:20: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/receive.c:1411:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1421:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1421:9: call_function: calling ‘close_inode_for_write’ from ‘process_enable_verity’
#  685|   static void close_inode_for_write(struct btrfs_receive *rctx)
#  686|   {
#  687|-> 	if(rctx->write_fd == -1)
#  688|   		return;
#  689|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
btrfs-progs-v6.17.1/cmds/receive.c:1026:25: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1194:23: call_function: calling ‘decompress_zlib’ from ‘decompress_and_write’
# 1024|   		rctx->zlib_stream = malloc(sizeof(z_stream));
# 1025|   		if (!rctx->zlib_stream) {
# 1026|-> 			error_mem("zlib stream: %m");
# 1027|   			return -ENOMEM;
# 1028|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
btrfs-progs-v6.17.1/cmds/receive.c:1077:38: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1075|   
# 1076|   	if (!rctx->zstd_dstream) {
# 1077|-> 		rctx->zstd_dstream = ZSTD_createDStream();
# 1078|   		if (!rctx->zstd_dstream) {
# 1079|   			error("failed to create zstd dstream");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
btrfs-progs-v6.17.1/cmds/receive.c:1079:25: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1077|   		rctx->zstd_dstream = ZSTD_createDStream();
# 1078|   		if (!rctx->zstd_dstream) {
# 1079|-> 			error("failed to create zstd dstream");
# 1080|   			return -ENOMEM;
# 1081|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
btrfs-progs-v6.17.1/cmds/receive.c:1083:15: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1081|   		}
# 1082|   	}
# 1083|-> 	ret = ZSTD_initDStream(rctx->zstd_dstream);
# 1084|   	if (ZSTD_isError(ret)) {
# 1085|   		error("failed to init zstd stream: %s", ZSTD_getErrorName(ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
btrfs-progs-v6.17.1/cmds/receive.c:1084:13: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1082|   	}
# 1083|   	ret = ZSTD_initDStream(rctx->zstd_dstream);
# 1084|-> 	if (ZSTD_isError(ret)) {
# 1085|   		error("failed to init zstd stream: %s", ZSTD_getErrorName(ret));
# 1086|   		return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
btrfs-progs-v6.17.1/cmds/receive.c:1085:17: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1083|   	ret = ZSTD_initDStream(rctx->zstd_dstream);
# 1084|   	if (ZSTD_isError(ret)) {
# 1085|-> 		error("failed to init zstd stream: %s", ZSTD_getErrorName(ret));
# 1086|   		return -EIO;
# 1087|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
btrfs-progs-v6.17.1/cmds/receive.c:1089:23: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1201:23: call_function: calling ‘decompress_zstd’ from ‘decompress_and_write’
# 1087|   	}
# 1088|   	while (in_buf.pos < in_buf.size && out_buf.pos < out_buf.size) {
# 1089|-> 		ret = ZSTD_decompressStream(rctx->zstd_dstream, &out_buf, &in_buf);
# 1090|   		if (ret == 0) {
# 1091|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
btrfs-progs-v6.17.1/cmds/receive.c:1120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1219:23: call_function: calling ‘decompress_lzo’ from ‘decompress_and_write’
# 1118|   
# 1119|   	if (encoded_len < 4) {
# 1120|-> 		error("lzo header is truncated");
# 1121|   		return -EIO;
# 1122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
btrfs-progs-v6.17.1/cmds/receive.c:1126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1175:12: enter_function: entry to ‘decompress_and_write’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1219:23: call_function: calling ‘decompress_lzo’ from ‘decompress_and_write’
# 1124|   	total_len = le32toh(total_len);
# 1125|   	if (total_len > encoded_len) {
# 1126|-> 		error("lzo header is invalid");
# 1127|   		return -EIO;
# 1128|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
btrfs-progs-v6.17.1/cmds/receive.c:1230:17: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1230:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/receive.c:1230:17: danger: ‘unencoded_data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1228|   #endif
# 1229|   	default:
# 1230|-> 		error("unknown compression: %d", compression);
# 1231|   		ret = -EOPNOTSUPP;
# 1232|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
btrfs-progs-v6.17.1/cmds/receive.c:1238:21: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1221:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1221:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1235:16: branch_true: following ‘true’ branch (when ‘written < unencoded_file_len’)...
btrfs-progs-v6.17.1/cmds/receive.c:1238:21: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1238:21: throw: if ‘pwrite’ throws an exception...
btrfs-progs-v6.17.1/cmds/receive.c:1238:21: danger: ‘unencoded_data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1236|   		ssize_t w;
# 1237|   
# 1238|-> 		w = pwrite(rctx->write_fd, unencoded_data + unencoded_offset,
# 1239|   			   unencoded_file_len - written, offset);
# 1240|   		if (w < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
btrfs-progs-v6.17.1/cmds/receive.c:1242:25: warning[-Wanalyzer-malloc-leak]: leak of ‘unencoded_data’
btrfs-progs-v6.17.1/cmds/receive.c:1186:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/receive.c:1187:12: branch_false: following ‘false’ branch (when ‘unencoded_data’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/receive.c:1192:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1221:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1221:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1235:16: branch_true: following ‘true’ branch (when ‘written < unencoded_file_len’)...
btrfs-progs-v6.17.1/cmds/receive.c:1238:21: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1242:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/receive.c:1242:25: danger: ‘unencoded_data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1240|   		if (w < 0) {
# 1241|   			ret = -errno;
# 1242|-> 			error("writing unencoded data failed: %m");
# 1243|   			goto out;
# 1244|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
btrfs-progs-v6.17.1/cmds/receive.c:1500:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rctx.dest_dir_fd’
btrfs-progs-v6.17.1/cmds/receive.c:1686:12: enter_function: entry to ‘cmd_receive’
btrfs-progs-v6.17.1/cmds/receive.c:1780:12: branch_false: following ‘false’ branch (when ‘dump == 0’)...
btrfs-progs-v6.17.1/cmds/receive.c:1782:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1782:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1785:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1787:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/receive.c:1800:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1800:12: branch_false: following ‘false’ branch (when ‘dump == 0’)...
btrfs-progs-v6.17.1/cmds/receive.c:1814:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/receive.c:1814:23: call_function: calling ‘do_receive’ from ‘cmd_receive’
# 1498|   		rctx->root_path = realmnt;
# 1499|   	} else {
# 1500|-> 		ret = find_mount_root(dest_dir_full_path, &rctx->root_path);
# 1501|   		if (ret < 0) {
# 1502|   			errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
btrfs-progs-v6.17.1/cmds/reflink.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   69|   		tmp[i++] = *str++;
#   70|   	if (i >= sizeof(tmp)) {
#   71|-> 		error("range spec too long");
#   72|   		exit(1);
#   73|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
btrfs-progs-v6.17.1/cmds/reflink.c:75:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   73|   	}
#   74|   	if (*str != ':') {
#   75|-> 		error("wrong range spec near %s", str);
#   76|   		exit(1);
#   77|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
btrfs-progs-v6.17.1/cmds/reflink.c:78:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   76|   		exit(1);
#   77|   	}
#   78|-> 	*from = arg_strtou64_with_suffix(tmp);
#   79|   	str++;
#   80|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
btrfs-progs-v6.17.1/cmds/reflink.c:90:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   88|   	}
#   89|   	if (*str != ':') {
#   90|-> 		error("wrong range spec near %s", str);
#   91|   		exit(1);
#   92|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
btrfs-progs-v6.17.1/cmds/reflink.c:93:19: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   91|   		exit(1);
#   92|   	}
#   93|-> 	*length = arg_strtou64_with_suffix(tmp);
#   94|   	str++;
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
btrfs-progs-v6.17.1/cmds/reflink.c:97:15: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
#   95|   
#   96|   	/* Parse to, until end of string */
#   97|-> 	*to = arg_strtou64_with_suffix(str);
#   98|   }
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
btrfs-progs-v6.17.1/cmds/reflink.c:98:1: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:129:40: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:98:1: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/5)
#   96|   	/* Parse to, until end of string */
#   97|   	*to = arg_strtou64_with_suffix(str);
#   98|-> }
#   99|   
#  100|   static int reflink_apply_range(int fd_in, int fd_out, const struct reflink_range *range)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/5)
#  124|   			fallthrough;
#  125|   		case 'r':
#  126|-> 			range = malloc(sizeof(struct reflink_range));
#  127|   			if (!range) {
#  128|   				error("not enough memory");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
btrfs-progs-v6.17.1/cmds/reflink.c:135:25: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:135:25: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:135:25: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
#  133|   			parse_reflink_range(optarg, &range->from, &range->length, &range->to);
#  134|   			list_add_tail(&range->list, &ranges);
#  135|-> 			pr_verbose(LOG_DEBUG, "ADD: %llu:%llu:%llu\n", range->from, range->length, range->to);
#  136|   			break;
#  137|   		default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
btrfs-progs-v6.17.1/cmds/reflink.c:138:25: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:138:25: throw: if ‘usage_unknown_option’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:138:25: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
#  136|   			break;
#  137|   		default:
#  138|-> 			usage_unknown_option(cmd, argv);
#  139|   		}
#  140|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
#  140|   	}
#  141|   
#  142|-> 	if (check_argc_exact(argc - optind, 2))
#  143|   		return 1;
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
btrfs-progs-v6.17.1/cmds/reflink.c:147:9: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:147:9: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:147:9: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
#  145|   	source = argv[optind];
#  146|   	target = argv[optind + 1];
#  147|-> 	pr_verbose(LOG_DEFAULT, "Source: %s\n", source);
#  148|   	pr_verbose(LOG_DEFAULT, "Target: %s\n", target);
#  149|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
btrfs-progs-v6.17.1/cmds/reflink.c:148:9: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:148:9: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:148:9: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
#  146|   	target = argv[optind + 1];
#  147|   	pr_verbose(LOG_DEFAULT, "Source: %s\n", source);
#  148|-> 	pr_verbose(LOG_DEFAULT, "Target: %s\n", target);
#  149|   
#  150|   	fd_source = open(source, O_RDONLY);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
btrfs-progs-v6.17.1/cmds/reflink.c:150:21: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:150:21: throw: if ‘open’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:150:21: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/5)
#  148|   	pr_verbose(LOG_DEFAULT, "Target: %s\n", target);
#  149|   
#  150|-> 	fd_source = open(source, O_RDONLY);
#  151|   	if (fd_source == -1) {
#  152|   		error("cannot open source file: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
btrfs-progs-v6.17.1/cmds/reflink.c:152:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:152:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:152:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:152:17: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5)
#  150|   	fd_source = open(source, O_RDONLY);
#  151|   	if (fd_source == -1) {
#  152|-> 		error("cannot open source file: %m");
#  153|   		ret = 1;
#  154|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(source, 0)’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:150:21: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: danger: ‘open(source, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  155|   	}
#  156|   	if (fd_target == -1) {
#  157|-> 		error("cannot open target file: %m");
#  158|   		ret = 1;
#  159|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: warning[-Wanalyzer-malloc-leak]: leak of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:126:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: danger: ‘range’ leaks here; was allocated at [(6)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/5)
#  155|   	}
#  156|   	if (fd_target == -1) {
#  157|-> 		error("cannot open target file: %m");
#  158|   		ret = 1;
#  159|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def160]
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmp.list.next’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: danger: use of uninitialized value ‘*tmp.list.next’ here
#  182|   	}
#  183|   out:
#  184|-> 	list_for_each_entry_safe(range, tmp, &ranges, list) {
#  185|   		free(range);
#  186|   	}

Error: GCC_ANALYZER_WARNING (CWE-415): [#def161]
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘range’
btrfs-progs-v6.17.1/cmds/reflink.c:105:12: enter_function: entry to ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:121:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:127:28: branch_false: following ‘false’ branch (when ‘range’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/reflink.c:131:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: call_function: calling ‘parse_reflink_range’ from ‘cmd_reflink_clone’
btrfs-progs-v6.17.1/cmds/reflink.c:133:25: return_function: returning to ‘cmd_reflink_clone’ from ‘parse_reflink_range’
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: release_memory: first ‘free’ here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: danger: second ‘free’ here; first ‘free’ was at [(31)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/30)
#  183|   out:
#  184|   	list_for_each_entry_safe(range, tmp, &ranges, list) {
#  185|-> 		free(range);
#  186|   	}
#  187|   	if (fd_source != -1)

Error: GCC_ANALYZER_WARNING (CWE-590): [#def162]
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘range’ which points to memory on the stack
btrfs-progs-v6.17.1/cmds/reflink.c:118:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/reflink.c:142:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:142:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:145:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:151:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:157:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:184:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/reflink.c:185:17: danger: call to ‘free’ here
#  183|   out:
#  184|   	list_for_each_entry_safe(range, tmp, &ranges, list) {
#  185|-> 		free(range);
#  186|   	}
#  187|   	if (fd_source != -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def163]
btrfs-progs-v6.17.1/cmds/replace.c:305:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_canonicalize(*<unknown>), 2)’
btrfs-progs-v6.17.1/cmds/replace.c:182:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:184:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:187:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:190:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:191:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/replace.c:196:18: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:199:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:206:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:209:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/replace.c:219:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:225:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:225:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:231:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:233:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:239:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:268:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:269:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:273:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:283:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:284:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:287:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:288:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:293:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:293:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:299:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:299:20: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/replace.c:300:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:305:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:305:9: throw: if ‘strncpy_null’ throws an exception...
btrfs-progs-v6.17.1/cmds/replace.c:305:9: danger: ‘open(path_canonicalize(*<unknown>), 2)’ leaks here; was opened at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
#  303|   	}
#  304|   
#  305|-> 	strncpy_null((char *)start_args.start.tgtdev_name, dstdev,
#  306|   		     BTRFS_DEVICE_PATH_NAME_MAX + 1);
#  307|   	ret = btrfs_prepare_device(fddstdev, dstdev, &dstdev_block_count, 0,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
btrfs-progs-v6.17.1/cmds/replace.c:308:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_canonicalize(*<unknown>), 2)’
btrfs-progs-v6.17.1/cmds/replace.c:182:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:184:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:187:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:190:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:191:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/replace.c:196:18: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:199:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:206:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:209:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/replace.c:219:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:225:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:225:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:231:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:233:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:239:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:268:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:269:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:273:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:283:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:284:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:287:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:288:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:293:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:293:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:299:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:299:20: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/replace.c:300:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/replace.c:305:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/replace.c:307:15: throw: if ‘btrfs_prepare_device’ throws an exception...
btrfs-progs-v6.17.1/cmds/replace.c:308:25: danger: ‘open(path_canonicalize(*<unknown>), 2)’ leaks here; was opened at [(27)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/26)
#  306|   		     BTRFS_DEVICE_PATH_NAME_MAX + 1);
#  307|   	ret = btrfs_prepare_device(fddstdev, dstdev, &dstdev_block_count, 0,
#  308|-> 			PREP_DEVICE_ZERO_END | PREP_DEVICE_VERBOSE |
#  309|   			(discard ? PREP_DEVICE_DISCARD : 0) |
#  310|   			(zoned ? PREP_DEVICE_ZONED : 0));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:108:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:756:12: enter_function: entry to ‘scan_one_device’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:768:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:771:37: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:772:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:778:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:784:21: call_function: inlined call to ‘is_super_block_address’ from ‘scan_one_device’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:787:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:791:47: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:798:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:804:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:805:23: call_function: calling ‘process_extent_buffer’ from ‘scan_one_device’
#  106|   	rec->cache.size = eb->len;
#  107|   	rec->generation = btrfs_header_generation(eb);
#  108|-> 	read_extent_buffer(eb, rec->csum, 0, BTRFS_CSUM_SIZE);
#  109|   	return rec;
#  110|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:183:24: warning[-Wanalyzer-malloc-leak]: leak of ‘create_chunk_item(chunk_rec)’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1311:12: enter_function: entry to ‘rebuild_sys_array’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1323:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1324:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1328:25: call_function: calling ‘create_chunk_item’ from ‘rebuild_sys_array’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1328:25: return_function: returning to ‘rebuild_sys_array’ from ‘create_chunk_item’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1329:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1334:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:183:24: danger: ‘create_chunk_item(chunk_rec)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  181|   	int i;
#  182|   
#  183|-> 	if (!record || record->num_stripes == 0)
#  184|   		return NULL;
#  185|   	ret = malloc(btrfs_chunk_item_size(record->num_stripes));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:787:21: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:756:12: enter_function: entry to ‘scan_one_device’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:768:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:771:37: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:771:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:772:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:778:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:784:21: call_function: inlined call to ‘is_super_block_address’ from ‘scan_one_device’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:784:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:787:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:787:21: throw: if ‘pread’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:787:21: danger: ‘buf’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  785|   			bytenr += rc->sectorsize;
#  786|   
#  787|-> 		if (pread(fd, buf->data, rc->nodesize, bytenr) <
#  788|   		    rc->nodesize)
#  789|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:994:39: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:977:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:978:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:980:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:990:46: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:991:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:994:39: throw: if ‘btrfs_find_device’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:994:39: danger: ‘map’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  992|   		memcpy(uuid, stripe->dev_uuid, BTRFS_UUID_SIZE);
#  993|   		map->stripes[i].physical = stripe->offset;
#  994|-> 		map->stripes[i].dev = btrfs_find_device(fs_info, devid,
#  995|   							uuid, NULL);
#  996|   		if (!map->stripes[i].dev) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1002:15: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:977:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:978:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:980:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1002:15: throw: if ‘insert_cache_extent’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1002:15: danger: ‘map’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1000|   	}
# 1001|   
# 1002|-> 	ret = insert_cache_extent(&map_tree->cache_tree, &map->ce);
# 1003|   	return ret;
# 1004|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1556:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1550:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1551:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1556:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1556:15: throw: if ‘btrfs_read_dev_super’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1556:15: danger: ‘open(path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1554|   	}
# 1555|   
# 1556|-> 	ret = btrfs_read_dev_super(fd, &sb, BTRFS_SUPER_INFO_OFFSET,
# 1557|   			SBREAD_RECOVER);
# 1558|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-835): [#def171]
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:1978:9: warning[-Wanalyzer-infinite-loop]: infinite loop
btrfs-progs-v6.17.1/cmds/rescue-chunk-recover.c:2166:25: call_function: inlined call to ‘count_devext_records’ from ‘rebuild_raid_data_chunk_stripes’
# 1976|   	struct device_extent_record *devext;
# 1977|   
# 1978|-> 	list_for_each_entry(devext, record_list, chunk_list)
# 1979|   		num_of_records++;
# 1980|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:131:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:152:12: enter_function: entry to ‘iterate_one_csum_item’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:173:23: branch_true: following ‘true’ branch (when ‘cur < data_size’)...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:175:25: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:177:23: call_function: calling ‘verify_one_data_block’ from ‘iterate_one_csum_item’
#  129|   		u64 read_len = blocksize;
#  130|   
#  131|-> 		ret = read_data_from_disk(fs_info, buf, logical, &read_len, mirror);
#  132|   		if (ret < 0) {
#  133|   			/* IO error, add one record. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:345:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:342:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:343:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:345:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:345:15: throw: if ‘read_data_from_disk’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:345:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  343|   	if (!buf)
#  344|   		return -ENOMEM;
#  345|-> 	ret = read_data_from_disk(fs_info, buf, logical, &read_len, mirror);
#  346|   	if (ret < 0) {
#  347|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def174]
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:458:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘((struct corrupted_block)*corrupted_blocks.next).error_mirror_bitmap’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:451:13: enter_function: entry to ‘free_corrupted_blocks’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:453:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:457:17: call_function: inlined call to ‘list_del_init’ from ‘free_corrupted_blocks’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:458:17: release_memory: first ‘free’ here
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:453:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:457:17: call_function: inlined call to ‘list_del_init’ from ‘free_corrupted_blocks’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:458:17: danger: second ‘free’ here; first ‘free’ was at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  456|   		entry = list_entry(corrupted_blocks.next, struct corrupted_block, list);
#  457|   		list_del_init(&entry->list);
#  458|-> 		free(entry->error_mirror_bitmap);
#  459|   		free(entry);
#  460|   	}

Error: GCC_ANALYZER_WARNING (CWE-415): [#def175]
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:75:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*(struct super_block_record *)MEM[(const struct list_head *)recover_10(D) + 8B].next.device_name’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:224:5: enter_function: entry to ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:232:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:236:9: call_function: inlined call to ‘init_recover_superblock’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:241:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:243:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: call_function: calling ‘recover_err_str’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: return_function: returning to ‘btrfs_recover_superblocks’ from ‘recover_err_str’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:289:9: call_function: calling ‘free_recover_superblock’ from ‘btrfs_recover_superblocks’
#   73|   				struct super_block_record, list);
#   74|   		list_del_init(&record->list);
#   75|-> 		free(record->device_name);
#   76|   		free(record);
#   77|   	}

Error: GCC_ANALYZER_WARNING (CWE-415): [#def176]
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:83:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*(struct super_block_record *)MEM[(const struct list_head *)recover_10(D) + 24B].next.device_name’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:224:5: enter_function: entry to ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:232:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:236:9: call_function: inlined call to ‘init_recover_superblock’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:241:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:243:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: call_function: calling ‘recover_err_str’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: return_function: returning to ‘btrfs_recover_superblocks’ from ‘recover_err_str’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:289:9: call_function: calling ‘free_recover_superblock’ from ‘btrfs_recover_superblocks’
#   81|   				struct super_block_record, list);
#   82|   		list_del_init(&record->list);
#   83|-> 		free(record->device_name);
#   84|   		free(record);
#   85|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:126:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:110:1: enter_function: entry to ‘read_dev_supers’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:119:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:120:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:123:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:124:26: call_function: inlined call to ‘btrfs_sb_offset’ from ‘read_dev_supers’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:126:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:126:23: throw: if ‘btrfs_read_dev_super’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:126:23: danger: ‘open(filename, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  124|   		bytenr = btrfs_sb_offset(i);
#  125|   
#  126|-> 		ret = btrfs_read_dev_super(fd, &sb, bytenr, SBREAD_DEFAULT);
#  127|   		if (!ret) {
#  128|   			ret = add_superblock_record(&sb, filename, bytenr,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:238:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dname, 0)’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:224:5: enter_function: entry to ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:231:14: acquire_resource: opened here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:232:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:236:9: call_function: inlined call to ‘init_recover_superblock’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:238:15: throw: if ‘btrfs_scan_fs_devices’ throws an exception...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:238:15: danger: ‘open(dname, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  236|   	init_recover_superblock(&recover);
#  237|   
#  238|-> 	ret = btrfs_scan_fs_devices(fd, dname, &recover.fs_devices, 0,
#  239|   			SBREAD_RECOVER, 0);
#  240|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
btrfs-progs-v6.17.1/cmds/restore.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#   80|   	ret = inflateInit(&strm);
#   81|   	if (ret != Z_OK) {
#   82|-> 		error("zlib init returned %d", ret);
#   83|   		return -1;
#   84|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
btrfs-progs-v6.17.1/cmds/restore.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#   80|   	ret = inflateInit(&strm);
#   81|   	if (ret != Z_OK) {
#   82|-> 		error("zlib init returned %d", ret);
#   83|   		return -1;
#   84|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
btrfs-progs-v6.17.1/cmds/restore.c:90:15: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#   88|   	strm.avail_out = decompress_len;
#   89|   	strm.next_out = (unsigned char *)outbuf;
#   90|-> 	ret = inflate(&strm, Z_NO_FLUSH);
#   91|   	if (ret != Z_STREAM_END) {
#   92|   		(void)inflateEnd(&strm);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
btrfs-progs-v6.17.1/cmds/restore.c:90:15: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#   88|   	strm.avail_out = decompress_len;
#   89|   	strm.next_out = (unsigned char *)outbuf;
#   90|-> 	ret = inflate(&strm, Z_NO_FLUSH);
#   91|   	if (ret != Z_STREAM_END) {
#   92|   		(void)inflateEnd(&strm);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def183]
btrfs-progs-v6.17.1/cmds/restore.c:102:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(const struct __una_u32 *)inbuf.x’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  100|   static inline size_t read_compress_length(unsigned char *buf)
#  101|   {
#  102|-> 	return get_unaligned_le32(buf);
#  103|   }
#  104|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
btrfs-progs-v6.17.1/cmds/restore.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  119|   	ret = lzo_init();
#  120|   	if (ret != LZO_E_OK) {
#  121|-> 		error("lzo init returned %d", ret);
#  122|   		return -1;
#  123|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
btrfs-progs-v6.17.1/cmds/restore.c:121:17: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  119|   	ret = lzo_init();
#  120|   	if (ret != LZO_E_OK) {
#  121|-> 		error("lzo init returned %d", ret);
#  122|   		return -1;
#  123|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
btrfs-progs-v6.17.1/cmds/restore.c:271:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1086:31: call_function: calling ‘search_dir’ from ‘search_dir’
#  269|   		}
#  270|   
#  271|-> 		next = btrfs_read_node_slot(c, slot);
#  272|   		if (extent_buffer_uptodate(next))
#  273|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
btrfs-progs-v6.17.1/cmds/restore.c:403:25: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  401|   		outbuf = calloc(1, ram_size);
#  402|   		if (!outbuf) {
#  403|-> 			error_mem(NULL);
#  404|   			free(inbuf);
#  405|   			return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
btrfs-progs-v6.17.1/cmds/restore.c:409:22: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  407|   	}
#  408|   
#  409|-> 	num_copies = btrfs_num_copies(root->fs_info, bytenr, disk_size - offset);
#  410|   again:
#  411|   	cur = bytenr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
btrfs-progs-v6.17.1/cmds/restore.c:409:22: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  407|   	}
#  408|   
#  409|-> 	num_copies = btrfs_num_copies(root->fs_info, bytenr, disk_size - offset);
#  410|   again:
#  411|   	cur = bytenr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
btrfs-progs-v6.17.1/cmds/restore.c:414:23: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  412|   	while (cur < bytenr + size_left) {
#  413|   		length = bytenr + size_left - cur;
#  414|-> 		ret = read_data_from_disk(root->fs_info, inbuf + cur - bytenr, cur,
#  415|   					  &length, mirror_num);
#  416|   		if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
btrfs-progs-v6.17.1/cmds/restore.c:414:23: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  412|   	while (cur < bytenr + size_left) {
#  413|   		length = bytenr + size_left - cur;
#  414|-> 		ret = read_data_from_disk(root->fs_info, inbuf + cur - bytenr, cur,
#  415|   					  &length, mirror_num);
#  416|   		if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
btrfs-progs-v6.17.1/cmds/restore.c:420:33: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  418|   			if (mirror_num > num_copies) {
#  419|   				ret = -1;
#  420|-> 				error("exhausted mirrors trying to read (%d > %d)",
#  421|   					mirror_num, num_copies);
#  422|   				goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
btrfs-progs-v6.17.1/cmds/restore.c:420:33: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  418|   			if (mirror_num > num_copies) {
#  419|   				ret = -1;
#  420|-> 				error("exhausted mirrors trying to read (%d > %d)",
#  421|   					mirror_num, num_copies);
#  422|   				goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
btrfs-progs-v6.17.1/cmds/restore.c:424:25: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  422|   				goto out;
#  423|   			}
#  424|-> 			pr_stderr(LOG_DEFAULT, "trying another mirror\n");
#  425|   			continue;
#  426|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
btrfs-progs-v6.17.1/cmds/restore.c:424:25: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  422|   				goto out;
#  423|   			}
#  424|-> 			pr_stderr(LOG_DEFAULT, "trying another mirror\n");
#  425|   			continue;
#  426|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
btrfs-progs-v6.17.1/cmds/restore.c:432:32: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  430|   	if (compress == BTRFS_COMPRESS_NONE) {
#  431|   		while (total < num_bytes) {
#  432|-> 			done = pwrite(fd, inbuf+total, num_bytes-total,
#  433|   				      pos+total);
#  434|   			if (done < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
btrfs-progs-v6.17.1/cmds/restore.c:436:33: warning[-Wanalyzer-malloc-leak]: leak of ‘inbuf’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  434|   			if (done < 0) {
#  435|   				ret = -1;
#  436|-> 				error("cannot write data: %d %m", errno);
#  437|   				goto out;
#  438|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
btrfs-progs-v6.17.1/cmds/restore.c:532:25: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  530|   				}
#  531|   			}
#  532|-> 			read_extent_buffer(leaf, name,
#  533|   					   (unsigned long)(di + 1), len);
#  534|   			name[len] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
btrfs-progs-v6.17.1/cmds/restore.c:546:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1002:30: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1002:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1005:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1006:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1008:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1009:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1016:31: call_function: calling ‘copy_file’ from ‘search_dir’
#  544|   				}
#  545|   			}
#  546|-> 			read_extent_buffer(leaf, data,
#  547|   					   (unsigned long)(di + 1) + name_len,
#  548|   					   len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
btrfs-progs-v6.17.1/cmds/restore.c:925:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1086:31: call_function: calling ‘search_dir’ from ‘search_dir’
#  923|   	key->offset = 0;
#  924|   	key->type = BTRFS_DIR_INDEX_KEY;
#  925|-> 	ret = btrfs_search_slot(NULL, root, key, &path, 0, 0);
#  926|   	if (ret < 0) {
#  927|   		error("search for next directory entry failed: %d", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
btrfs-progs-v6.17.1/cmds/restore.c:927:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1086:31: call_function: calling ‘search_dir’ from ‘search_dir’
#  925|   	ret = btrfs_search_slot(NULL, root, key, &path, 0, 0);
#  926|   	if (ret < 0) {
#  927|-> 		error("search for next directory entry failed: %d", ret);
#  928|   		goto out;
#  929|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
btrfs-progs-v6.17.1/cmds/restore.c:935:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1086:31: call_function: calling ‘search_dir’ from ‘search_dir’
#  933|   	leaf = path.nodes[0];
#  934|   	while (!leaf) {
#  935|-> 		pr_verbose(LOG_INFO,
#  936|   			   "No leaf after search, looking for the next leaf\n");
#  937|   		ret = next_leaf(root, &path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
btrfs-progs-v6.17.1/cmds/restore.c:1046:47: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1034:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1039:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1039:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1045:33: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1046:47: throw: if ‘btrfs_read_fs_root’ throws an exception...
btrfs-progs-v6.17.1/cmds/restore.c:1046:47: danger: ‘dir’ leaks here; was allocated at [(20)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/19)
# 1044|   
# 1045|   				location.offset = (u64)-1;
# 1046|-> 				search_root = btrfs_read_fs_root(root->fs_info,
# 1047|   								 &location);
# 1048|   				if (IS_ERR(search_root)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
btrfs-progs-v6.17.1/cmds/restore.c:1071:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dir’
btrfs-progs-v6.17.1/cmds/restore.c:908:12: enter_function: entry to ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:926:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:933:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: following ‘false’ branch (when ‘leaf’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:934:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:952:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:969:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘search_dir’
btrfs-progs-v6.17.1/cmds/restore.c:970:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:975:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:975:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:980:28: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1001:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1024:27: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1026:37: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/restore.c:1028:28: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/restore.c:1034:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1034:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/restore.c:1071:25: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/restore.c:1071:25: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/restore.c:1071:25: danger: ‘dir’ leaks here; was allocated at [(20)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/19)
# 1069|   			}
# 1070|   
# 1071|-> 			pr_verbose(LOG_INFO, "Restoring %s\n", path_name);
# 1072|   
# 1073|   			errno = 0;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def205]
btrfs-progs-v6.17.1/cmds/scrub.c:460:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
btrfs-progs-v6.17.1/cmds/scrub.c:1849:12: enter_function: entry to ‘cmd_scrub_status’
btrfs-progs-v6.17.1/cmds/scrub.c:1888:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1891:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1894:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1897:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1898:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1904:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1904:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1909:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1910:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1917:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1920:12: branch_false: following ‘false’ branch (when ‘fdres != -1’)...
btrfs-progs-v6.17.1/cmds/scrub.c:1925:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1925:9: call_function: calling ‘scrub_datafile’ from ‘cmd_scrub_status’
#  458|   
#  459|   	datafile[ret] = '.';
#  460|-> 	strncpy(datafile + ret + 1, fn_local, end - ret - 1);
#  461|   	ret = strlen(datafile);
#  462|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def206]
btrfs-progs-v6.17.1/cmds/scrub.c:1929:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fdres’
btrfs-progs-v6.17.1/cmds/scrub.c:1849:12: enter_function: entry to ‘cmd_scrub_status’
btrfs-progs-v6.17.1/cmds/scrub.c:1888:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1891:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1894:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1897:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1898:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1904:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1904:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1909:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1910:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/scrub.c:1917:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1919:17: acquire_resource: stream socket created here
btrfs-progs-v6.17.1/cmds/scrub.c:1920:12: branch_false: following ‘false’ branch (when ‘fdres != -1’)...
btrfs-progs-v6.17.1/cmds/scrub.c:1925:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/scrub.c:1925:9: call_function: calling ‘scrub_datafile’ from ‘cmd_scrub_status’
btrfs-progs-v6.17.1/cmds/scrub.c:1925:9: return_function: returning to ‘cmd_scrub_status’ from ‘scrub_datafile’
btrfs-progs-v6.17.1/cmds/scrub.c:1929:15: throw: if ‘connect’ throws an exception...
btrfs-progs-v6.17.1/cmds/scrub.c:1929:15: danger: ‘fdres’ leaks here
# 1927|   	/* ignore EOVERFLOW, just use shorter name and hope for the best */
# 1928|   	addr.sun_path[sizeof(addr.sun_path) - 1] = '\0';
# 1929|-> 	ret = connect(fdres, (struct sockaddr *)&addr, sizeof(addr));
# 1930|   	if (ret == -1) {
# 1931|   		close(fdres);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
btrfs-progs-v6.17.1/cmds/send.c:277:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:274:35: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:277:17: throw: if ‘fcntl’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:277:17: danger: ‘pipefd[1]’ leaks here
#  275|   		io_send.flags |= BTRFS_SEND_FLAG_VERSION;
#  276|   
#  277|-> 		fcntl(pipefd[0], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  278|   		fcntl(pipefd[1], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  279|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def208]
btrfs-progs-v6.17.1/cmds/send.c:277:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[is_first_subvol]’
btrfs-progs-v6.17.1/cmds/send.c:497:12: enter_function: entry to ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:647:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:650:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:680:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:681:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:687:15: call_function: inlined call to ‘init_root_path’ from ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:688:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: following ‘false’ branch (when ‘snapshot_parent’ is NULL)...
btrfs-progs-v6.17.1/cmds/send.c:708:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:708:26: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:746:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:751:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:758:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:779:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:783:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:789:20: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:795:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:795:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: following ‘false’ branch (when ‘new_end_cmd_semantic == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:817:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:817:23: call_function: calling ‘do_send’ from ‘cmd_send’
#  275|   		io_send.flags |= BTRFS_SEND_FLAG_VERSION;
#  276|   
#  277|-> 		fcntl(pipefd[0], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  278|   		fcntl(pipefd[1], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  279|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
btrfs-progs-v6.17.1/cmds/send.c:277:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘send.send_fd’
btrfs-progs-v6.17.1/cmds/send.c:497:12: enter_function: entry to ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:647:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:650:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:680:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:681:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:687:15: call_function: inlined call to ‘init_root_path’ from ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:688:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: following ‘false’ branch (when ‘snapshot_parent’ is NULL)...
btrfs-progs-v6.17.1/cmds/send.c:708:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:708:26: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:746:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:751:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:758:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:779:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:783:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:789:20: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:795:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:795:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: following ‘false’ branch (when ‘new_end_cmd_semantic == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:817:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:817:23: call_function: calling ‘do_send’ from ‘cmd_send’
#  275|   		io_send.flags |= BTRFS_SEND_FLAG_VERSION;
#  276|   
#  277|-> 		fcntl(pipefd[0], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  278|   		fcntl(pipefd[1], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  279|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def210]
btrfs-progs-v6.17.1/cmds/send.c:278:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:274:35: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:278:17: throw: if ‘fcntl’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:278:17: danger: ‘pipefd[1]’ leaks here
#  276|   
#  277|   		fcntl(pipefd[0], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  278|-> 		fcntl(pipefd[1], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  279|   	}
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def211]
btrfs-progs-v6.17.1/cmds/send.c:278:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[is_first_subvol]’
btrfs-progs-v6.17.1/cmds/send.c:497:12: enter_function: entry to ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:647:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:650:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:680:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:681:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:687:15: call_function: inlined call to ‘init_root_path’ from ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:688:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: following ‘false’ branch (when ‘snapshot_parent’ is NULL)...
btrfs-progs-v6.17.1/cmds/send.c:708:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:708:26: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:746:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:751:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:758:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:779:26: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:783:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:789:20: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:795:21: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:795:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:808:20: branch_false: following ‘false’ branch (when ‘new_end_cmd_semantic == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:817:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:817:23: call_function: calling ‘do_send’ from ‘cmd_send’
#  276|   
#  277|   		fcntl(pipefd[0], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  278|-> 		fcntl(pipefd[1], F_SETPIPE_SZ, BTRFS_SEND_BUF_SIZE_V2);
#  279|   	}
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def212]
btrfs-progs-v6.17.1/cmds/send.c:286:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:282:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:283:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/cmds/send.c:284:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:286:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:286:17: danger: ‘pipefd[1]’ leaks here
#  284|   		ret = -ret;
#  285|   		errno = -ret;
#  286|-> 		error("thread setup failed: %m");
#  287|   		goto out;
#  288|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
btrfs-progs-v6.17.1/cmds/send.c:331:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:282:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:283:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/cmds/send.c:284:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:330:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:331:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:331:17: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:331:17: danger: ‘pipefd[1]’ leaks here
#  329|   out:
#  330|   	if (subvol_fd != -1)
#  331|-> 		close(subvol_fd);
#  332|   	if (pipefd[0] != -1)
#  333|   		close(pipefd[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def214]
btrfs-progs-v6.17.1/cmds/send.c:333:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:282:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:283:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/cmds/send.c:284:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:330:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:331:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:332:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:333:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:333:17: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:333:17: danger: ‘pipefd[1]’ leaks here
#  331|   		close(subvol_fd);
#  332|   	if (pipefd[0] != -1)
#  333|-> 		close(pipefd[0]);
#  334|   	if (pipefd[1] != -1)
#  335|   		close(pipefd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def215]
btrfs-progs-v6.17.1/cmds/send.c:335:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:282:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:283:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/cmds/send.c:284:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:330:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:331:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:332:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:334:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:334:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:335:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:335:17: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/send.c:335:17: danger: ‘pipefd[1]’ leaks here
#  333|   		close(pipefd[0]);
#  334|   	if (pipefd[1] != -1)
#  335|-> 		close(pipefd[1]);
#  336|   	return ret;
#  337|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def216]
btrfs-progs-v6.17.1/cmds/send.c:336:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
btrfs-progs-v6.17.1/cmds/send.c:251:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:257:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:258:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:264:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:269:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:281:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/cmds/send.c:282:23: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:283:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/cmds/send.c:284:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:330:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/send.c:331:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/send.c:332:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:334:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:334:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:336:16: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:336:16: danger: ‘pipefd[1]’ leaks here
#  334|   	if (pipefd[1] != -1)
#  335|   		close(pipefd[1]);
#  336|-> 	return ret;
#  337|   }
#  338|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
btrfs-progs-v6.17.1/cmds/send.c:418:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘send.mnt_fd’
btrfs-progs-v6.17.1/cmds/send.c:497:12: enter_function: entry to ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:546:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:549:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:561:28: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:567:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:567:31: call_function: calling ‘set_root_info’ from ‘cmd_send’
#  416|   		goto out;
#  417|   
#  418|-> 	ret = get_root_id(sctx, subvol_strip_mountpoint(sctx->root_path, subvol),
#  419|   		root_id);
#  420|   	if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
btrfs-progs-v6.17.1/cmds/send.c:444:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘send.mnt_fd’
btrfs-progs-v6.17.1/cmds/send.c:497:12: enter_function: entry to ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:647:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:650:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:680:31: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:681:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/send.c:687:15: call_function: inlined call to ‘init_root_path’ from ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:687:15: call_function: inlined call to ‘init_root_path’ from ‘cmd_send’
btrfs-progs-v6.17.1/cmds/send.c:688:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:691:12: branch_false: following ‘false’ branch (when ‘snapshot_parent’ is NULL)...
btrfs-progs-v6.17.1/cmds/send.c:708:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:708:26: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/send.c:746:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/send.c:749:32: call_function: calling ‘get_sysfs_proto_supported’ from ‘cmd_send’
#  442|   	u64 version;
#  443|   
#  444|-> 	ret = sysfs_read_file_u64("features/send_stream_version", &version);
#  445|   	if (ret < 0) {
#  446|   		/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  498|   
#  499|   	rb_link_node(&ins->rb_node, parent, p);
#  500|-> 	rb_insert_color(&ins->rb_node, root_tree);
#  501|   	return 0;
#  502|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  498|   
#  499|   	rb_link_node(&ins->rb_node, parent, p);
#  500|-> 	rb_insert_color(&ins->rb_node, root_tree);
#  501|   	return 0;
#  502|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ri’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1426:12: enter_function: entry to ‘btrfs_list_subvols_print’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1445:15: call_function: calling ‘btrfs_list_subvols’ from ‘btrfs_list_subvols_print’
#  498|   
#  499|   	rb_link_node(&ins->rb_node, parent, p);
#  500|-> 	rb_insert_color(&ins->rb_node, root_tree);
#  501|   	return 0;
#  502|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:610:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  608|   	ri = calloc(1, sizeof(*ri));
#  609|   	if (!ri) {
#  610|-> 		error_mem(NULL);
#  611|   		exit(1);
#  612|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:610:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  608|   	ri = calloc(1, sizeof(*ri));
#  609|   	if (!ri) {
#  610|-> 		error_mem(NULL);
#  611|   		exit(1);
#  612|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:618:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  616|   		ri->name = malloc(name_len + 1);
#  617|   		if (!ri->name) {
#  618|-> 			error_mem(NULL);
#  619|   			exit(1);
#  620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:618:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  616|   		ri->name = malloc(name_len + 1);
#  617|   		if (!ri->name) {
#  618|-> 			error_mem(NULL);
#  619|   			exit(1);
#  620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:618:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ri’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1426:12: enter_function: entry to ‘btrfs_list_subvols_print’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1445:15: call_function: calling ‘btrfs_list_subvols’ from ‘btrfs_list_subvols_print’
#  616|   		ri->name = malloc(name_len + 1);
#  617|   		if (!ri->name) {
#  618|-> 			error_mem(NULL);
#  619|   			exit(1);
#  620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:621:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1426:12: enter_function: entry to ‘btrfs_list_subvols_print’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1445:15: call_function: calling ‘btrfs_list_subvols’ from ‘btrfs_list_subvols_print’
#  619|   			exit(1);
#  620|   		}
#  621|-> 		strncpy_null(ri->name, name, name_len + 1);
#  622|   	}
#  623|   	if (ref_tree)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:621:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  619|   			exit(1);
#  620|   		}
#  621|-> 		strncpy_null(ri->name, name, name_len + 1);
#  622|   	}
#  623|   	if (ref_tree)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:621:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  619|   			exit(1);
#  620|   		}
#  621|-> 		strncpy_null(ri->name, name, name_len + 1);
#  622|   	}
#  623|   	if (ref_tree)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:621:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ri’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1426:12: enter_function: entry to ‘btrfs_list_subvols_print’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1445:15: call_function: calling ‘btrfs_list_subvols’ from ‘btrfs_list_subvols_print’
#  619|   			exit(1);
#  620|   		}
#  621|-> 		strncpy_null(ri->name, name, name_len + 1);
#  622|   	}
#  623|   	if (ref_tree)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:847:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  845|   	while(1) {
#  846|   		sk->nr_items = 4096;
#  847|-> 		ret = btrfs_tree_search_ioctl(fd, &args);
#  848|   		if (ret < 0)
#  849|   			return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:847:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_true: following ‘true’ branch (when ‘is_list_all != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: call_function: calling ‘btrfs_list_setup_filter’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1719:17: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_setup_filter’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
#  845|   	while(1) {
#  846|   		sk->nr_items = 4096;
#  847|-> 		ret = btrfs_tree_search_ioctl(fd, &args);
#  848|   		if (ret < 0)
#  849|   			return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1437:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_parse_filter_string’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: following ‘false’ branch (when ‘is_list_all == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: following ‘false’ branch (when ‘is_only_in_path == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1728:9: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
# 1435|   
# 1436|   	if (full_path) {
# 1437|-> 		ret = lookup_path_rootid(fd, &top_id);
# 1438|   		if (ret) {
# 1439|   			errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1437:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_parse_filter_string’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: following ‘false’ branch (when ‘is_list_all == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: following ‘false’ branch (when ‘is_only_in_path == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1728:9: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
# 1435|   
# 1436|   	if (full_path) {
# 1437|-> 		ret = lookup_path_rootid(fd, &top_id);
# 1438|   		if (ret) {
# 1439|   			errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1440:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_parse_filter_string’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: following ‘false’ branch (when ‘is_list_all == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: following ‘false’ branch (when ‘is_only_in_path == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1728:9: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
# 1438|   		if (ret) {
# 1439|   			errno = -ret;
# 1440|-> 			error("cannot resolve rootid for path: %m");
# 1441|   			return ret;
# 1442|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1440:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1662:31: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_parse_filter_string’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1718:12: branch_false: following ‘false’ branch (when ‘is_list_all == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1722:17: branch_false: following ‘false’ branch (when ‘is_only_in_path == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1728:9: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1736:15: call_function: calling ‘btrfs_list_subvols_print’ from ‘cmd_subvolume_list’
# 1438|   		if (ret) {
# 1439|   			errno = -ret;
# 1440|-> 			error("cannot resolve rootid for path: %m");
# 1441|   			return ret;
# 1442|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1522:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1520|   	switch (*(opt_arg++)) {
# 1521|   	case '+':
# 1522|-> 		arg = arg_strtou64(opt_arg);
# 1523|   		type += 2;
# 1524|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1522:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1520|   	switch (*(opt_arg++)) {
# 1521|   	case '+':
# 1522|-> 		arg = arg_strtou64(opt_arg);
# 1523|   		type += 2;
# 1524|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1528:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1526|   		break;
# 1527|   	case '-':
# 1528|-> 		arg = arg_strtou64(opt_arg);
# 1529|   		type += 1;
# 1530|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1528:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1526|   		break;
# 1527|   	case '-':
# 1528|-> 		arg = arg_strtou64(opt_arg);
# 1529|   		type += 1;
# 1530|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1535:23: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1533|   	default:
# 1534|   		opt_arg--;
# 1535|-> 		arg = arg_strtou64(opt_arg);
# 1536|   
# 1537|   		btrfs_list_setup_filter(filters, type, arg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1535:23: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1672:25: call_function: inlined call to ‘btrfs_list_setup_print_column’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1673:31: call_function: calling ‘btrfs_list_parse_filter_string’ from ‘cmd_subvolume_list’
# 1533|   	default:
# 1534|   		opt_arg--;
# 1535|-> 		arg = arg_strtou64(opt_arg);
# 1536|   
# 1537|   		btrfs_list_setup_filter(filters, type, arg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1571:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
# 1569|   	set = calloc(1, size);
# 1570|   	if (!set) {
# 1571|-> 		error_mem(NULL);
# 1572|   		exit(1);
# 1573|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/8)
# 1694|   	}
# 1695|   
# 1696|-> 	if (check_argc_exact(argc - optind, 1))
# 1697|   		goto out;
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: throw: if ‘check_argc_exact’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/3)
# 1694|   	}
# 1695|   
# 1696|-> 	if (check_argc_exact(argc - optind, 1))
# 1697|   		goto out;
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: throw: if ‘btrfs_open_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/8)
# 1698|   
# 1699|   	subvol = argv[optind];
# 1700|-> 	fd = btrfs_open_dir(subvol);
# 1701|   	if (fd < 0) {
# 1702|   		ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_true: following ‘true’ branch (when ‘c < 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:13: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: throw: if ‘btrfs_open_dir’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1700:14: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/3)
# 1698|   
# 1699|   	subvol = argv[optind];
# 1700|-> 	fd = btrfs_open_dir(subvol);
# 1701|   	if (fd < 0) {
# 1702|   		ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/8)
# 1701|   	if (fd < 0) {
# 1702|   		ret = -1;
# 1703|-> 		error("can't access '%s'", subvol);
# 1704|   		goto out;
# 1705|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1703:17: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/3)
# 1701|   	if (fd < 0) {
# 1702|   		ret = -1;
# 1703|-> 		error("can't access '%s'", subvol);
# 1704|   		goto out;
# 1705|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: throw: if ‘lookup_path_rootid’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/8)
# 1709|   					flags);
# 1710|   
# 1711|-> 	ret = lookup_path_rootid(fd, &top_id);
# 1712|   	if (ret) {
# 1713|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: throw: if ‘lookup_path_rootid’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/3)
# 1709|   					flags);
# 1710|   
# 1711|-> 	ret = lookup_path_rootid(fd, &top_id);
# 1712|   	if (ret) {
# 1713|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1713:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/8)
# 1712|   	if (ret) {
# 1713|   		errno = -ret;
# 1714|-> 		error("cannot resolve rootid for path: %m");
# 1715|   		goto out;
# 1716|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1696:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1699:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1701:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1707:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1711:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1712:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1713:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1714:17: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/3)
# 1712|   	if (ret) {
# 1713|   		errno = -ret;
# 1714|-> 		error("cannot resolve rootid for path: %m");
# 1715|   		goto out;
# 1716|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: danger: ‘comparer_set’ leaks here; was allocated at [(9)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/8)
# 1738|   
# 1739|   out:
# 1740|-> 	close(fd);
# 1741|   	free(filter_set);
# 1742|   	free(comparer_set);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: throw: if ‘close’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1740:9: danger: ‘filter_set’ leaks here; was allocated at [(4)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/3)
# 1738|   
# 1739|   out:
# 1740|-> 	close(fd);
# 1741|   	free(filter_set);
# 1742|   	free(comparer_set);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
btrfs-progs-v6.17.1/cmds/subvolume.c:455:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dupdname’
btrfs-progs-v6.17.1/cmds/subvolume.c:391:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:395:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:449:12: branch_false: following ‘false’ branch (when ‘cpath’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/subvolume.c:454:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:454:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:455:17: throw: if ‘path_dirname’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:455:17: danger: ‘dupdname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  453|   	}
#  454|   	dupdname = strdup(cpath);
#  455|-> 	dname = path_dirname(dupdname);
#  456|   	dupvname = strdup(cpath);
#  457|   	vname = path_basename(dupvname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
btrfs-progs-v6.17.1/cmds/subvolume.c:457:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dupvname’
btrfs-progs-v6.17.1/cmds/subvolume.c:391:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:395:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:449:12: branch_false: following ‘false’ branch (when ‘cpath’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/subvolume.c:454:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:456:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:457:17: throw: if ‘path_basename’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:457:17: danger: ‘dupvname’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  455|   	dname = path_dirname(dupdname);
#  456|   	dupvname = strdup(cpath);
#  457|-> 	vname = path_basename(dupvname);
#  458|   	free(cpath);
#  459|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
btrfs-progs-v6.17.1/cmds/subvolume.c:712:27: warning[-Wanalyzer-malloc-leak]: leak of ‘dupname’
btrfs-progs-v6.17.1/cmds/subvolume.c:681:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:686:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:691:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:696:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:697:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:711:27: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:711:27: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:712:27: throw: if ‘path_basename’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:712:27: danger: ‘dupname’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  710|   
#  711|   		dupname = strdup(subvol);
#  712|-> 		newname = path_basename(dupname);
#  713|   
#  714|   		dstdir = malloc(strlen(dst) + 1 + strlen(newname) + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
btrfs-progs-v6.17.1/cmds/subvolume.c:731:15: warning[-Wanalyzer-malloc-leak]: leak of ‘dstdir’
btrfs-progs-v6.17.1/cmds/subvolume.c:681:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:686:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:691:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:696:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:697:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:731:15: throw: if ‘btrfs_util_subvolume_snapshot’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:731:15: danger: ‘dstdir’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  729|   	}
#  730|   
#  731|-> 	err = btrfs_util_subvolume_snapshot(subvol, dstdir, flags, NULL, inherit);
#  732|   	if (err) {
#  733|   		error_btrfs_util(err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
btrfs-progs-v6.17.1/cmds/subvolume.c:733:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dstdir’
btrfs-progs-v6.17.1/cmds/subvolume.c:681:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:686:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:691:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:696:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:697:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:732:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:733:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:733:17: throw: if ‘btrfs_util_strerror’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:733:17: danger: ‘dstdir’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  731|   	err = btrfs_util_subvolume_snapshot(subvol, dstdir, flags, NULL, inherit);
#  732|   	if (err) {
#  733|-> 		error_btrfs_util(err);
#  734|   		goto out;
#  735|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
btrfs-progs-v6.17.1/cmds/subvolume.c:740:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dstdir’
btrfs-progs-v6.17.1/cmds/subvolume.c:681:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:686:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:691:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:696:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:697:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:732:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:739:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:739:12: branch_true: following ‘true’ branch (when ‘flags != 0’)...
btrfs-progs-v6.17.1/cmds/subvolume.c:740:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:740:17: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:740:17: danger: ‘dstdir’ leaks here; was allocated at [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12)
#  738|   
#  739|   	if (flags & BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY)
#  740|-> 		pr_verbose(LOG_DEFAULT,
#  741|   			   "Create readonly snapshot of '%s' in '%s'\n",
#  742|   			   subvol, dstdir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
btrfs-progs-v6.17.1/cmds/subvolume.c:744:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dstdir’
btrfs-progs-v6.17.1/cmds/subvolume.c:681:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:686:22: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:691:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:696:15: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:697:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:707:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:728:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:732:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:739:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:739:12: branch_false: following ‘false’ branch (when ‘flags == 0’)...
btrfs-progs-v6.17.1/cmds/subvolume.c:744:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:744:17: throw: if ‘pr_verbose’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:744:17: danger: ‘dstdir’ leaks here; was allocated at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
#  742|   			   subvol, dstdir);
#  743|   	else
#  744|-> 		pr_verbose(LOG_DEFAULT,
#  745|   			   "Create snapshot of '%s' in '%s'\n",
#  746|   			   subvol, dstdir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
btrfs-progs-v6.17.1/cmds/subvolume.c:1002:17: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
btrfs-progs-v6.17.1/cmds/subvolume.c:1048:14: enter_function: entry to ‘ino_resolve’
btrfs-progs-v6.17.1/cmds/subvolume.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1083:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1083:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1086:21: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘ino_resolve’
btrfs-progs-v6.17.1/cmds/subvolume.c:1087:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1090:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1096:24: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:1097:20: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/subvolume.c:1103:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1114:19: call_function: calling ‘__ino_resolve’ from ‘ino_resolve’
# 1000|   	ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
# 1001|   	if (ret < 0) {
# 1002|-> 		error("failed to lookup path for dirid %llu: %m", dirid);
# 1003|   		return ERR_PTR(ret);
# 1004|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
btrfs-progs-v6.17.1/cmds/subvolume.c:1013:25: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
btrfs-progs-v6.17.1/cmds/subvolume.c:1048:14: enter_function: entry to ‘ino_resolve’
btrfs-progs-v6.17.1/cmds/subvolume.c:1078:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1083:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1083:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1086:21: call_function: inlined call to ‘btrfs_tree_search_data’ from ‘ino_resolve’
btrfs-progs-v6.17.1/cmds/subvolume.c:1087:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1090:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1096:24: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:1097:20: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/subvolume.c:1103:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1114:19: call_function: calling ‘__ino_resolve’ from ‘ino_resolve’
# 1011|   		full = strdup(args.name);
# 1012|   		if (!full) {
# 1013|-> 			error_mem(NULL);
# 1014|   			return ERR_PTR(-ENOMEM);
# 1015|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
btrfs-progs-v6.17.1/cmds/subvolume.c:1629:17: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol_path’
btrfs-progs-v6.17.1/cmds/subvolume.c:1551:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1551:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1554:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1560:33: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1561:12: branch_false: following ‘false’ branch (when ‘fullpath’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/subvolume.c:1566:14: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1567:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1572:12: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1607:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1612:23: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1613:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1620:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1620:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1621:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1622:31: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:1628:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1629:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1629:17: throw: if ‘fmt_start’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:1629:17: danger: ‘subvol_path’ leaks here; was allocated at [(15)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/14)
# 1627|   
# 1628|   	if (bconf.output_format == CMD_FORMAT_JSON) {
# 1629|-> 		fmt_start(&fctx, btrfs_subvolume_rowspec, 1, 0);
# 1630|   		fmt_print_start_group(&fctx, subvol_path, JSON_TYPE_MAP);
# 1631|   		print_subvolume_show_json(&fctx, &subvol, subvol_path, subvol_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
btrfs-progs-v6.17.1/cmds/subvolume.c:1790:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ids’
btrfs-progs-v6.17.1/cmds/subvolume.c:1752:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1755:33: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1756:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1760:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1763:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1775:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1775:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:1776:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1776:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1782:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1786:36: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1790:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:1790:33: danger: ‘ids’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
# 1788|   			id = strtoull(arg, NULL, 10);
# 1789|   			if (errno) {
# 1790|-> 				error("unrecognized subvolume id %s", arg);
# 1791|   				ret = 1;
# 1792|   				goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
btrfs-progs-v6.17.1/cmds/subvolume.c:1796:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ids’
btrfs-progs-v6.17.1/cmds/subvolume.c:1752:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1755:33: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1756:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1760:9: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1763:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1775:30: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1775:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/subvolume.c:1776:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1776:20: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1782:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1786:36: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1789:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/subvolume.c:1794:29: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume.c:1796:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/cmds/subvolume.c:1796:33: danger: ‘ids’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
# 1794|   			if (id < BTRFS_FIRST_FREE_OBJECTID ||
# 1795|   			    id > BTRFS_LAST_FREE_OBJECTID) {
# 1796|-> 				error("subvolume id %s out of range", arg);
# 1797|   				ret = 1;
# 1798|   				goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
btrfs-progs-v6.17.1/common/device-scan.c:160:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-scan.c:148:12: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:151:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:151:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-scan.c:152:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:160:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:160:9: throw: if ‘uuid_generate’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:160:9: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  158|   	dev_item = &disk_super->dev_item;
#  159|   
#  160|-> 	uuid_generate(device->uuid);
#  161|   	device->fs_info = fs_info;
#  162|   	device->devid = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
btrfs-progs-v6.17.1/common/device-scan.c:160:9: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
btrfs-progs-v6.17.1/common/device-scan.c:147:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-scan.c:148:12: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:151:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:152:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:160:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:160:9: throw: if ‘uuid_generate’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:160:9: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  158|   	dev_item = &disk_super->dev_item;
#  159|   
#  160|-> 	uuid_generate(device->uuid);
#  161|   	device->fs_info = fs_info;
#  162|   	device->devid = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
btrfs-progs-v6.17.1/common/device-scan.c:180:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-scan.c:148:12: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:151:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:151:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-scan.c:152:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:160:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:174:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:179:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:179:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:180:17: branch_true: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:180:17: throw: if ‘pretty_size_mode’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:180:17: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  178|   
#  179|   	if (check_add_overflow(old_size, device_total_bytes, &new_size)) {
#  180|-> 		error(
#  181|   		"adding device of %llu (%s) bytes would exceed max file system size",
#  182|   		      device->total_bytes, pretty_size(device->total_bytes));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
btrfs-progs-v6.17.1/common/device-scan.c:188:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-scan.c:148:12: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:151:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:151:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-scan.c:152:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:160:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:174:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:179:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:179:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:187:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:188:15: throw: if ‘btrfs_add_device’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:188:15: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  186|   
#  187|   	INIT_LIST_HEAD(&device->dev_list);
#  188|-> 	ret = btrfs_add_device(trans, fs_info, device);
#  189|   	if (ret)
#  190|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def272]
btrfs-progs-v6.17.1/common/device-scan.c:241:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/btrfs-control", 2)’
btrfs-progs-v6.17.1/common/device-scan.c:234:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/device-scan.c:235:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:240:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:241:9: throw: if ‘strncpy_null’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:241:9: danger: ‘open("/dev/btrfs-control", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  239|   	}
#  240|   	memset(&args, 0, sizeof(args));
#  241|-> 	strncpy_null(args.name, fname, sizeof(args.name));
#  242|   	ret = ioctl(fd, BTRFS_IOC_SCAN_DEV, &args);
#  243|   	if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
btrfs-progs-v6.17.1/common/device-scan.c:484:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
btrfs-progs-v6.17.1/common/device-scan.c:452:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:455:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:464:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:467:23: branch_true: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:473:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:476:46: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:476:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:479:22: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:479:22: acquire_resource: opened here
btrfs-progs-v6.17.1/common/device-scan.c:480:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:484:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:484:23: throw: if ‘btrfs_scan_one_device’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:484:23: danger: ‘open(&path, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  482|   			continue;
#  483|   		}
#  484|-> 		ret = btrfs_scan_one_device(fd, path, &tmp_devices,
#  485|   				&num_devices, BTRFS_SUPER_INFO_OFFSET,
#  486|   				SBREAD_DEFAULT);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
btrfs-progs-v6.17.1/common/device-scan.c:529:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*<unknown>, 0)’
btrfs-progs-v6.17.1/common/device-scan.c:509:16: branch_true: following ‘true’ branch (when ‘dev_optind < dev_argc’)...
btrfs-progs-v6.17.1/common/device-scan.c:514:46: branch_true: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:524:22: acquire_resource: opened here
btrfs-progs-v6.17.1/common/device-scan.c:525:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:529:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:529:23: throw: if ‘btrfs_scan_one_device’ throws an exception...
btrfs-progs-v6.17.1/common/device-scan.c:529:23: danger: ‘open(*<unknown>, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  527|   			return -errno;
#  528|   		}
#  529|-> 		ret = btrfs_scan_one_device(fd, dev_argv[dev_optind], &fs_devices,
#  530|   					    &num_devices,
#  531|   					    BTRFS_SUPER_INFO_OFFSET,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
btrfs-progs-v6.17.1/common/device-utils.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:134:12: enter_function: entry to ‘zero_dev_clamped’
btrfs-progs-v6.17.1/common/device-utils.c:151:16: call_function: calling ‘device_zero_blocks’ from ‘zero_dev_clamped’
#  118|   	written = btrfs_pwrite(fd, buf, len, start, direct);
#  119|   	if (written != len) {
#  120|-> 		error_msg(ERROR_MSG_WRITE, "zeroing range from %llu: %m",
#  121|   			  (unsigned long long)start);
#  122|   		ret = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def276]
btrfs-progs-v6.17.1/common/device-utils.c:348:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&sysfs, 0)’
btrfs-progs-v6.17.1/common/device-utils.c:338:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:340:16: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:343:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:345:17: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:345:17: acquire_resource: opened here
btrfs-progs-v6.17.1/common/device-utils.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:348:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:348:15: throw: if ‘sysfs_read_file’ throws an exception...
btrfs-progs-v6.17.1/common/device-utils.c:348:15: danger: ‘open(&sysfs, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  346|   	if (sysfd < 0)
#  347|   		return -errno;
#  348|-> 	ret = sysfs_read_file(sysfd, sizebuf, sizeof(sizebuf));
#  349|   	close(sysfd);
#  350|   	if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
btrfs-progs-v6.17.1/common/device-utils.c:420:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&sysfs_path, 0)’
btrfs-progs-v6.17.1/common/device-utils.c:393:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:397:17: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:398:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:404:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:405:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:410:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:415:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/device-utils.c:416:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:419:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:420:9: danger: ‘open(&sysfs_path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  418|   
#  419|   	len = read(fd, buf, len);
#  420|-> 	close(fd);
#  421|   
#  422|   	return len;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
btrfs-progs-v6.17.1/common/device-utils.c:478:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’
btrfs-progs-v6.17.1/common/device-utils.c:465:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:468:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:468:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:469:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-utils.c:469:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:478:22: throw: if ‘readdir’ throws an exception...
btrfs-progs-v6.17.1/common/device-utils.c:478:22: danger: ‘fdopendir(sysfs_open_fsid_dir(fd, "devices"))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  476|   		char buf[128] = {0};
#  477|   
#  478|-> 		de = readdir(dir);
#  479|   		if (!de) {
#  480|   			ret = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
btrfs-progs-v6.17.1/common/device-utils.c:587:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  585|   
#  586|   	if (fstat(fd, &stat_buf) == -1) {
#  587|-> 		error("fstat failed: %m");
#  588|   		return -errno;
#  589|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
btrfs-progs-v6.17.1/common/device-utils.c:597:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  595|   
#  596|   	if (ioctl(fd, req, &alignment)) {
#  597|-> 		error("failed to get block size: %m");
#  598|   		return -errno;
#  599|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
btrfs-progs-v6.17.1/common/device-utils.c:602:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  600|   
#  601|   	if (IS_ALIGNED((size_t)buf, alignment) && IS_ALIGNED(count, alignment))
#  602|-> 		return pwrite(fd, buf, count, offset);
#  603|   
#  604|   	/* Cannot do anything if the write size is not aligned */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
btrfs-progs-v6.17.1/common/device-utils.c:606:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  604|   	/* Cannot do anything if the write size is not aligned */
#  605|   	if (!IS_ALIGNED(count, alignment)) {
#  606|-> 		error("%zu is not aligned to %d", count, alignment);
#  607|   		return -EINVAL;
#  608|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
btrfs-progs-v6.17.1/common/device-utils.c:614:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  612|   	ret = posix_memalign(&bounce_buf, alignment, iosize);
#  613|   	if (ret) {
#  614|-> 		error_mem("bounce buffer");
#  615|   		errno = ret;
#  616|   		return -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
btrfs-progs-v6.17.1/common/device-utils.c:621:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  619|   	UASSERT(iosize == count);
#  620|   	memcpy(bounce_buf, buf, count);
#  621|-> 	ret = pwrite(fd, bounce_buf, iosize, offset);
#  622|   
#  623|   	free(bounce_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
btrfs-progs-v6.17.1/common/device-utils.h:67:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#   65|   {
#   66|   	if (!direct)
#   67|-> 		return pwrite(fd, buf, count, offset);
#   68|   
#   69|   	return btrfs_direct_pwrite(fd, buf, count, offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
btrfs-progs-v6.17.1/common/device-utils.h:75:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:31: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:348:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:367:23: call_function: calling ‘btrfs_pread’ from ‘read_raid56’
#   73|   {
#   74|   	if (!direct)
#   75|-> 		return pread(fd, buf, count, offset);
#   76|   
#   77|   	return btrfs_direct_pread(fd, buf, count, offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
btrfs-progs-v6.17.1/common/device-utils.h:75:24: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:341:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:348:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:367:23: call_function: calling ‘btrfs_pread’ from ‘read_raid56’
#   73|   {
#   74|   	if (!direct)
#   75|-> 		return pread(fd, buf, count, offset);
#   76|   
#   77|   	return btrfs_direct_pread(fd, buf, count, offset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
btrfs-progs-v6.17.1/common/device-utils.h:77:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:31: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:348:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:367:23: call_function: calling ‘btrfs_pread’ from ‘read_raid56’
#   75|   		return pread(fd, buf, count, offset);
#   76|   
#   77|-> 	return btrfs_direct_pread(fd, buf, count, offset);
#   78|   }
#   79|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
btrfs-progs-v6.17.1/common/device-utils.h:77:16: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:341:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:348:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:367:23: call_function: calling ‘btrfs_pread’ from ‘read_raid56’
#   75|   		return pread(fd, buf, count, offset);
#   76|   
#   77|-> 	return btrfs_direct_pread(fd, buf, count, offset);
#   78|   }
#   79|   #else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
btrfs-progs-v6.17.1/common/extent-cache.c:128:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_cache_extent(start,  size)’
btrfs-progs-v6.17.1/common/extent-cache.c:111:5: enter_function: entry to ‘add_cache_extent’
btrfs-progs-v6.17.1/common/extent-cache.c:113:35: call_function: calling ‘alloc_cache_extent’ from ‘add_cache_extent’
btrfs-progs-v6.17.1/common/extent-cache.c:113:35: return_function: returning to ‘add_cache_extent’ from ‘alloc_cache_extent’
btrfs-progs-v6.17.1/common/extent-cache.c:116:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/extent-cache.c:119:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/extent-cache.c:119:15: call_function: calling ‘insert_cache_extent’ from ‘add_cache_extent’
#  126|   int insert_cache_extent(struct cache_tree *tree, struct cache_extent *pe)
#  127|   {
#  128|-> 	return rb_insert(&tree->root, &pe->rb_node, cache_tree_comp_nodes);
#  129|   }
#  130|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def291]
btrfs-progs-v6.17.1/common/filesystem-utils.c:128:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(mount_path, 262144)’
btrfs-progs-v6.17.1/common/filesystem-utils.c:121:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/filesystem-utils.c:122:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/filesystem-utils.c:127:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/filesystem-utils.c:128:9: throw: if ‘strncpy_null’ throws an exception...
btrfs-progs-v6.17.1/common/filesystem-utils.c:128:9: danger: ‘open(mount_path, 262144)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  126|   
#  127|   	memset(label, 0, sizeof(label));
#  128|-> 	strncpy_null(label, labelp, BTRFS_LABEL_SIZE);
#  129|   	if (ioctl(fd, BTRFS_IOC_SET_FSLABEL, label) < 0) {
#  130|   		error("unable to set label of %s: %m", mount_path);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def292]
btrfs-progs-v6.17.1/common/format-output.c:36:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:352:26: call_function: calling ‘fmt_set_unquoted’ from ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:352:26: return_function: returning to ‘fmt_print’ from ‘fmt_set_unquoted’
btrfs-progs-v6.17.1/common/format-output.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:357:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:357:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:362:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:362:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:366:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:366:19: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:367:27: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:369:17: call_function: calling ‘print_uuid’ from ‘fmt_print’
#   34|   	char uuidparse[BTRFS_UUID_UNPARSED_SIZE];
#   35|   
#   36|-> 	if (uuid_is_null(uuid)) {
#   37|   		printf("null");
#   38|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def293]
btrfs-progs-v6.17.1/common/format-output.c:39:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:352:26: call_function: calling ‘fmt_set_unquoted’ from ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:352:26: return_function: returning to ‘fmt_print’ from ‘fmt_set_unquoted’
btrfs-progs-v6.17.1/common/format-output.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:357:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:357:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:362:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:362:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:366:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:366:19: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:367:27: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:369:17: call_function: calling ‘print_uuid’ from ‘fmt_print’
#   37|   		printf("null");
#   38|   	} else {
#   39|-> 		uuid_unparse(uuid, uuidparse);
#   40|   		printf("%s", uuidparse);
#   41|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def294]
btrfs-progs-v6.17.1/common/format-output.c:109:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:322:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:337:19: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:337:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/format-output.c:338:28: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:338:20: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:339:53: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:339:25: call_function: calling ‘fmt_print_start_group’ from ‘fmt_print’
#  107|   {
#  108|   	if (fctx->depth >= JSON_NESTING_LIMIT - 1) {
#  109|-> 		internal_error("nesting too deep, limit %d", JSON_NESTING_LIMIT);
#  110|   		exit(1);
#  111|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def295]
btrfs-progs-v6.17.1/common/format-output.c:164:21: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:152:25: branch_true: following ‘true’ branch (when ‘i != 2’)...
btrfs-progs-v6.17.1/common/format-output.c:153:38: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:153:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:152:63: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:153:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:152:63: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:157:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:161:17: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:161:17: acquire_resource: ‘va_copy’ called here
btrfs-progs-v6.17.1/common/format-output.c:164:21: throw: if ‘uuid_is_null’ throws an exception...
btrfs-progs-v6.17.1/common/format-output.c:164:21: danger: missing call to ‘va_end’ to match ‘va_copy’ at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  162|   		uuid = va_arg(tmpargs, const u8 *);
#  163|   
#  164|-> 		if (uuid_is_null(uuid)) {
#  165|   			va_end(tmpargs);
#  166|   			return true;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def296]
btrfs-progs-v6.17.1/common/format-output.c:318:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_false: following ‘false’ branch (when ‘found == 0’)...
btrfs-progs-v6.17.1/common/format-output.c:318:17: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:318:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/common/format-output.c:318:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  316|   	}
#  317|   	if (!found) {
#  318|-> 		internal_error("unknown key: %s", key);
#  319|   		exit(1);
#  320|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def297]
btrfs-progs-v6.17.1/common/format-output.c:410:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:352:26: call_function: calling ‘fmt_set_unquoted’ from ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:352:26: return_function: returning to ‘fmt_print’ from ‘fmt_set_unquoted’
btrfs-progs-v6.17.1/common/format-output.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:357:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:357:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:362:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:362:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:366:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:366:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:370:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:370:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:383:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:383:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:394:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:394:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:395:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:395:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:396:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:396:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:405:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:405:19: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:406:27: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:409:20: branch_true: following ‘true’ branch (when ‘size != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:410:25: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:410:25: throw: if ‘pretty_size_mode’ throws an exception...
btrfs-progs-v6.17.1/common/format-output.c:410:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  408|   
#  409|   		if (size)
#  410|-> 			printf("%s", pretty_size_mode(size, unit_mode));
#  411|   		else
#  412|   			putchar('-');

Error: GCC_ANALYZER_WARNING (CWE-404): [#def298]
btrfs-progs-v6.17.1/common/format-output.c:417:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:352:26: call_function: calling ‘fmt_set_unquoted’ from ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:352:26: return_function: returning to ‘fmt_print’ from ‘fmt_set_unquoted’
btrfs-progs-v6.17.1/common/format-output.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:357:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:357:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:362:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:362:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:366:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:366:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:370:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:370:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:383:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:383:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:394:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:394:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:395:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:395:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:396:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:396:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:405:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:405:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:413:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:413:19: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/format-output.c:414:27: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:417:17: throw: if ‘pretty_size_mode’ throws an exception...
btrfs-progs-v6.17.1/common/format-output.c:417:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  415|   		const unsigned int unit_mode = va_arg(args, unsigned int);
#  416|   
#  417|-> 		printf("%s", pretty_size_mode(size, unit_mode));
#  418|   	} else {
#  419|   		internal_error("unknown format %s", row->fmt);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def299]
btrfs-progs-v6.17.1/common/format-output.c:419:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_true: following ‘true’ branch (when ‘found != 0’)...
btrfs-progs-v6.17.1/common/format-output.c:322:13: branch_true: ...to here
btrfs-progs-v6.17.1/common/format-output.c:352:26: call_function: calling ‘fmt_set_unquoted’ from ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:352:26: return_function: returning to ‘fmt_print’ from ‘fmt_set_unquoted’
btrfs-progs-v6.17.1/common/format-output.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/format-output.c:357:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:357:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:362:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:362:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:366:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:366:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:370:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:370:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:383:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:383:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:394:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:394:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:395:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:395:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:396:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:396:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:405:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:405:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:413:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:413:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/format-output.c:419:17: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:419:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/common/format-output.c:419:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
#  417|   		printf("%s", pretty_size_mode(size, unit_mode));
#  418|   	} else {
#  419|-> 		internal_error("unknown format %s", row->fmt);
#  420|   	}
#  421|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
btrfs-progs-v6.17.1/common/open-utils.c:68:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
btrfs-progs-v6.17.1/common/open-utils.c:127:5: enter_function: entry to ‘check_mounted’
btrfs-progs-v6.17.1/common/open-utils.c:132:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/open-utils.c:133:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/open-utils.c:138:16: branch_false: ...to here
btrfs-progs-v6.17.1/common/open-utils.c:138:16: call_function: calling ‘check_mounted_where’ from ‘check_mounted’
#   66|   
#   67|   	/* scan the initial device */
#   68|-> 	ret = btrfs_scan_one_device(fd, file, &fs_devices_mnt,
#   69|   		    &total_devs, BTRFS_SUPER_INFO_OFFSET, sbflags);
#   70|   	is_btrfs = (ret >= 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def301]
btrfs-progs-v6.17.1/common/open-utils.c:174:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
btrfs-progs-v6.17.1/common/open-utils.c:150:5: enter_function: entry to ‘get_btrfs_mount’
btrfs-progs-v6.17.1/common/open-utils.c:156:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/open-utils.c:167:14: branch_false: ...to here
btrfs-progs-v6.17.1/common/open-utils.c:167:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/open-utils.c:168:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/open-utils.c:174:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/open-utils.c:174:15: call_function: calling ‘check_mounted_where’ from ‘get_btrfs_mount’
#  172|   	}
#  173|   
#  174|-> 	ret = check_mounted_where(fd, dev, mp, mp_size, NULL, SBREAD_DEFAULT, false);
#  175|   	if (!ret) {
#  176|   		ret = -EINVAL;

Error: COMPILER_WARNING (CWE-704): [#def302]
btrfs-progs-v6.17.1/common/parse-utils.c: scope_hint: In function ‘parse_range_u64’
btrfs-progs-v6.17.1/common/parse-utils.c:82:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   82 |         dots = strstr(range, "..");
#      |              ^
#   80|   	int skipped = 0;
#   81|   
#   82|-> 	dots = strstr(range, "..");
#   83|   	if (!dots)
#   84|   		return 1;

Error: COMPILER_WARNING (CWE-704): [#def303]
btrfs-progs-v6.17.1/common/parse-utils.c:82:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   80|   	int skipped = 0;
#   81|   
#   82|-> 	dots = strstr(range, "..");
#   83|   	if (!dots)
#   84|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
btrfs-progs-v6.17.1/common/parse-utils.c:370:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 0)’
btrfs-progs-v6.17.1/common/parse-utils.c:353:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/parse-utils.c:354:17: branch_true: ...to here
btrfs-progs-v6.17.1/common/parse-utils.c:365:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/parse-utils.c:367:14: branch_false: ...to here
btrfs-progs-v6.17.1/common/parse-utils.c:367:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/parse-utils.c:368:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/parse-utils.c:370:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/parse-utils.c:370:15: throw: if ‘lookup_path_rootid’ throws an exception...
btrfs-progs-v6.17.1/common/parse-utils.c:370:15: danger: ‘open(p, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  368|   	if (fd < 0)
#  369|   		goto err;
#  370|-> 	ret = lookup_path_rootid(fd, &id);
#  371|   	if (ret) {
#  372|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def305]
btrfs-progs-v6.17.1/common/path-utils.c:206:13: warning[-Wanalyzer-null-argument]: use of NULL ‘a’ where non-null expected
btrfs-progs-v6.17.1/common/path-utils.c:231:5: enter_function: entry to ‘is_same_loop_file’
btrfs-progs-v6.17.1/common/path-utils.c:240:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:244:19: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:244:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:245:23: branch_true: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:246:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:247:29: branch_true: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:247:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:257:20: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:257:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:261:19: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:273:16: call_function: calling ‘is_same_blk_file’ from ‘is_same_loop_file’
#  204|   		return 1;
#  205|   
#  206|-> 	if (stat(a, &st_buf_a) < 0 || stat(b, &st_buf_b) < 0) {
#  207|   		if (errno == ENOENT)
#  208|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def306]
btrfs-progs-v6.17.1/common/path-utils.c:206:39: warning[-Wanalyzer-null-argument]: use of NULL ‘b’ where non-null expected
btrfs-progs-v6.17.1/common/path-utils.c:231:5: enter_function: entry to ‘is_same_loop_file’
btrfs-progs-v6.17.1/common/path-utils.c:240:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:244:19: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:257:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:261:19: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:261:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:262:23: branch_true: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:263:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:264:29: branch_true: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:264:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/path-utils.c:273:16: branch_false: ...to here
btrfs-progs-v6.17.1/common/path-utils.c:273:16: call_function: calling ‘is_same_blk_file’ from ‘is_same_loop_file’
#  204|   		return 1;
#  205|   
#  206|-> 	if (stat(a, &st_buf_a) < 0 || stat(b, &st_buf_b) < 0) {
#  207|   		if (errno == ENOENT)
#  208|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
btrfs-progs-v6.17.1/common/send-stream.c:79:25: warning[-Wanalyzer-malloc-leak]: leak of ‘sctx.read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:595:5: enter_function: entry to ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: call_function: calling ‘read_buf’ from ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: return_function: returning to ‘btrfs_read_and_process_send_stream’ from ‘read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:612:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:619:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:619:12: branch_false: following ‘false’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/send-stream.c:625:24: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:633:25: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:633:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/send-stream.c:634:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:639:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:642:23: call_function: calling ‘read_and_process_cmd’ from ‘btrfs_read_and_process_send_stream’
#   77|   		if (rbytes < 0) {
#   78|   			ret = -errno;
#   79|-> 			error("read from stream failed: %m");
#   80|   			goto out;
#   81|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
btrfs-progs-v6.17.1/common/send-stream.c:92:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sctx.read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:595:5: enter_function: entry to ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: call_function: calling ‘read_buf’ from ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: return_function: returning to ‘btrfs_read_and_process_send_stream’ from ‘read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:612:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:619:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:619:12: branch_false: following ‘false’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/send-stream.c:625:24: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:633:25: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:633:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/send-stream.c:634:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:639:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:642:23: call_function: calling ‘read_and_process_cmd’ from ‘btrfs_read_and_process_send_stream’
#   90|   out_eof:
#   91|   	if (0 < pos && pos < len) {
#   92|-> 		error("short read from stream: expected %zu read %zu", len, pos);
#   93|   		ret = -EIO;
#   94|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
btrfs-progs-v6.17.1/common/send-stream.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sctx.read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:595:5: enter_function: entry to ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: call_function: calling ‘read_buf’ from ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: return_function: returning to ‘btrfs_read_and_process_send_stream’ from ‘read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:612:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:619:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:619:12: branch_false: following ‘false’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/send-stream.c:625:24: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:633:25: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:633:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/send-stream.c:634:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:639:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:642:23: call_function: calling ‘read_and_process_cmd’ from ‘btrfs_read_and_process_send_stream’
#  127|   	if (ret) {
#  128|   		ret = -EINVAL;
#  129|-> 		error("unexpected EOF in stream");
#  130|   		goto out;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
btrfs-progs-v6.17.1/common/send-stream.c:145:25: warning[-Wanalyzer-malloc-leak]: leak of ‘sctx.read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:595:5: enter_function: entry to ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: call_function: calling ‘read_buf’ from ‘btrfs_read_and_process_send_stream’
btrfs-progs-v6.17.1/common/send-stream.c:611:15: return_function: returning to ‘btrfs_read_and_process_send_stream’ from ‘read_buf’
btrfs-progs-v6.17.1/common/send-stream.c:612:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:614:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:619:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:619:12: branch_false: following ‘false’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/send-stream.c:625:24: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:633:25: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:633:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/send-stream.c:634:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/send-stream.c:639:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/send-stream.c:642:23: call_function: calling ‘read_and_process_cmd’ from ‘btrfs_read_and_process_send_stream’
#  143|   			ret = -ENOMEM;
#  144|   			errno = -ret;
#  145|-> 			error_mem("read buffer for command");
#  146|   			goto out;
#  147|   		}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def311]
btrfs-progs-v6.17.1/common/string-table.c:61:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/string-table.c:78:7: enter_function: entry to ‘table_printf’
btrfs-progs-v6.17.1/common/string-table.c:84:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/string-table.c:85:15: call_function: calling ‘table_vprintf’ from ‘table_printf’
#   59|   	if (column >= tab->ncols || row >= tab->nrows) {
#   60|   		free(msg);
#   61|-> 		error("attempt to write outside of table: col %u row %u fmt %s",
#   62|   			column, row, fmt);
#   63|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def312]
btrfs-progs-v6.17.1/common/units.c:172:21: warning[-Wanalyzer-null-argument]: use of NULL ‘*argv’ where non-null expected
btrfs-progs-v6.17.1/common/units.c:171:25: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/units.c:172:32: branch_true: ...to here
btrfs-progs-v6.17.1/common/units.c:172:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/common/units.c:175:21: branch_false: ...to here
btrfs-progs-v6.17.1/common/units.c:175:20: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/common/units.c:176:25: branch_true: ...to here
btrfs-progs-v6.17.1/common/units.c:171:25: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/units.c:172:32: branch_true: ...to here
btrfs-progs-v6.17.1/common/units.c:172:21: release_memory: ‘*argv’ is NULL
btrfs-progs-v6.17.1/common/units.c:172:21: danger: argument 1 (‘*<unknown>’) NULL where non-null expected
#  170|   
#  171|   	for (arg_i = 0; arg_i < *argc; arg_i++) {
#  172|-> 		if (strcmp(argv[arg_i], "--") == 0)
#  173|   			break;
#  174|   

Error: COMPILER_WARNING (CWE-704): [#def313]
btrfs-progs-v6.17.1/common/utils.c: scope_hint: In function ‘find_option’
btrfs-progs-v6.17.1/common/utils.c:385:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  385 |         tmp = strstr(options, option);
#      |             ^
#  383|   	char *tmp, *ret;
#  384|   
#  385|-> 	tmp = strstr(options, option);
#  386|   	if (!tmp)
#  387|   		return NULL;

Error: COMPILER_WARNING (CWE-704): [#def314]
btrfs-progs-v6.17.1/common/utils.c:385:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  383|   	char *tmp, *ret;
#  384|   
#  385|-> 	tmp = strstr(options, option);
#  386|   	if (!tmp)
#  387|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def315]
btrfs-progs-v6.17.1/common/utils.c:580:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/self/mountinfo", "r")’
btrfs-progs-v6.17.1/common/utils.c:567:15: acquire_resource: opened here
btrfs-progs-v6.17.1/common/utils.c:568:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/utils.c:571:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:580:22: throw: if ‘fgetc’ throws an exception...
btrfs-progs-v6.17.1/common/utils.c:580:22: danger: ‘fopen("/proc/self/mountinfo", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  578|   		int ch;
#  579|   
#  580|-> 		ch = fgetc(mnt);
#  581|   		if (ch == -1)
#  582|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
btrfs-progs-v6.17.1/common/utils.c:580:22: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/utils.c:568:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/utils.c:571:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:571:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:580:22: throw: if ‘fgetc’ throws an exception...
btrfs-progs-v6.17.1/common/utils.c:580:22: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  578|   		int ch;
#  579|   
#  580|-> 		ch = fgetc(mnt);
#  581|   		if (ch == -1)
#  582|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
btrfs-progs-v6.17.1/common/utils.c:580:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/self/mountinfo", "r")’
btrfs-progs-v6.17.1/common/utils.c:567:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/utils.c:568:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/utils.c:571:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:572:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:580:22: throw: if ‘fgetc’ throws an exception...
btrfs-progs-v6.17.1/common/utils.c:580:22: danger: ‘fopen("/proc/self/mountinfo", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  578|   		int ch;
#  579|   
#  580|-> 		ch = fgetc(mnt);
#  581|   		if (ch == -1)
#  582|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def318]
btrfs-progs-v6.17.1/common/utils.c:674:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 262144)’
btrfs-progs-v6.17.1/common/utils.c:671:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/utils.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/utils.c:674:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:674:9: danger: ‘open(path, 262144)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  672|   	if (fd < 0)
#  673|   		return -errno;
#  674|-> 	close(fd);
#  675|   
#  676|   	mnttab = setmntent("/proc/self/mounts", "r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
btrfs-progs-v6.17.1/common/utils.c:681:21: warning[-Wanalyzer-malloc-leak]: leak of ‘longest_match’
btrfs-progs-v6.17.1/common/utils.c:672:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/utils.c:674:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:677:12: branch_false: following ‘false’ branch (when ‘mnttab’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:677:12: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:680:16: branch_true: following ‘true’ branch (when ‘ent’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:681:36: branch_true: ...to here
btrfs-progs-v6.17.1/common/utils.c:686:49: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/utils.c:687:36: branch_false: following ‘false’ branch (when ‘longest_match’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:691:52: branch_false: ...to here
btrfs-progs-v6.17.1/common/utils.c:680:16: branch_true: following ‘true’ branch (when ‘ent’ is non-NULL)...
btrfs-progs-v6.17.1/common/utils.c:681:36: branch_true: ...to here
btrfs-progs-v6.17.1/common/utils.c:681:21: throw: if ‘path_is_in_dir’ throws an exception...
btrfs-progs-v6.17.1/common/utils.c:681:21: danger: ‘longest_match’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  679|   
#  680|   	while ((ent = getmntent(mnttab))) {
#  681|-> 		if (path_is_in_dir(ent->mnt_dir, path)) {
#  682|   			len = strlen(ent->mnt_dir);
#  683|   			if (longest_matchlen <= len) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def320]
btrfs-progs-v6.17.1/common/utils.c:837:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
btrfs-progs-v6.17.1/common/utils.c:834:14: acquire_resource: opened here
btrfs-progs-v6.17.1/common/utils.c:835:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/common/utils.c:836:23: branch_true: ...to here
btrfs-progs-v6.17.1/common/utils.c:837:17: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  835|   	if (fd >= 0) {
#  836|   		ret = read(fd, rand_seed, sizeof(rand_seed));
#  837|-> 		close(fd);
#  838|   		if (ret < sizeof(rand_seed))
#  839|   			goto fallback;

Error: COMPILER_WARNING (CWE-704): [#def321]
btrfs-progs-v6.17.1/common/utils.c: scope_hint: In function ‘bconf_save_param’
btrfs-progs-v6.17.1/common/utils.c:965:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  965 |         tmp = strchr(str, '=');
#      |             ^
#  963|   	char *tmp;
#  964|   
#  965|-> 	tmp = strchr(str, '=');
#  966|   	if (!tmp) {
#  967|   		bconf_add_param(str, NULL);

Error: COMPILER_WARNING (CWE-704): [#def322]
btrfs-progs-v6.17.1/common/utils.c:965:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  963|   	char *tmp;
#  964|   
#  965|-> 	tmp = strchr(str, '=');
#  966|   	if (!tmp) {
#  967|   		bconf_add_param(str, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
btrfs-progs-v6.17.1/convert/common.c:179:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bg_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:700:15: return_function: returning to ‘setup_temp_extent_tree’ from ‘setup_temp_extent_buffer’
btrfs-progs-v6.17.1/convert/common.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:706:51: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:706:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:707:20: branch_false: following ‘false’ branch (when ‘bg_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:711:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:711:23: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  177|   	int ret;
#  178|   
#  179|-> 	ret = uuid_parse(cfg->fs_uuid, fsid);
#  180|   	if (ret)
#  181|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
btrfs-progs-v6.17.1/convert/common.c:179:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/convert/common.c:535:12: enter_function: entry to ‘setup_temp_empty_tree’
btrfs-progs-v6.17.1/convert/common.c:541:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:542:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:544:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:544:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_empty_tree’
#  177|   	int ret;
#  178|   
#  179|-> 	ret = uuid_parse(cfg->fs_uuid, fsid);
#  180|   	if (ret)
#  181|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
btrfs-progs-v6.17.1/convert/common.c:179:15: warning[-Wanalyzer-malloc-leak]: leak of ‘extent_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:694:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  177|   	int ret;
#  178|   
#  179|-> 	ret = uuid_parse(cfg->fs_uuid, fsid);
#  180|   	if (ret)
#  181|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
btrfs-progs-v6.17.1/convert/common.c:179:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/convert/common.c:563:12: enter_function: entry to ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:607:12: branch_true: following ‘true’ branch (when ‘skinny_metadata != 0’)...
btrfs-progs-v6.17.1/convert/common.c:608:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:617:12: branch_false: following ‘false’ branch (when ‘skinny_metadata == 0’)...
btrfs-progs-v6.17.1/convert/common.c:625:37: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:625:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:626:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:628:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:628:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘insert_temp_extent_item’
#  177|   	int ret;
#  178|   
#  179|-> 	ret = uuid_parse(cfg->fs_uuid, fsid);
#  180|   	if (ret)
#  181|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
btrfs-progs-v6.17.1/convert/common.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bg_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:700:15: return_function: returning to ‘setup_temp_extent_tree’ from ‘setup_temp_extent_buffer’
btrfs-progs-v6.17.1/convert/common.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:706:51: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:706:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:707:20: branch_false: following ‘false’ branch (when ‘bg_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:711:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:711:23: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  180|   	if (ret)
#  181|   		return -EINVAL;
#  182|-> 	ret = uuid_parse(cfg->chunk_uuid, chunk_uuid);
#  183|   	if (ret)
#  184|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
btrfs-progs-v6.17.1/convert/common.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/convert/common.c:535:12: enter_function: entry to ‘setup_temp_empty_tree’
btrfs-progs-v6.17.1/convert/common.c:541:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:542:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:544:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:544:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_empty_tree’
#  180|   	if (ret)
#  181|   		return -EINVAL;
#  182|-> 	ret = uuid_parse(cfg->chunk_uuid, chunk_uuid);
#  183|   	if (ret)
#  184|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
btrfs-progs-v6.17.1/convert/common.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘extent_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:694:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  180|   	if (ret)
#  181|   		return -EINVAL;
#  182|-> 	ret = uuid_parse(cfg->chunk_uuid, chunk_uuid);
#  183|   	if (ret)
#  184|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
btrfs-progs-v6.17.1/convert/common.c:182:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/convert/common.c:563:12: enter_function: entry to ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:607:12: branch_true: following ‘true’ branch (when ‘skinny_metadata != 0’)...
btrfs-progs-v6.17.1/convert/common.c:608:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:617:12: branch_false: following ‘false’ branch (when ‘skinny_metadata == 0’)...
btrfs-progs-v6.17.1/convert/common.c:625:37: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:625:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:626:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:628:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:628:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘insert_temp_extent_item’
#  180|   	if (ret)
#  181|   		return -EINVAL;
#  182|-> 	ret = uuid_parse(cfg->chunk_uuid, chunk_uuid);
#  183|   	if (ret)
#  184|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
btrfs-progs-v6.17.1/convert/common.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bg_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:700:15: return_function: returning to ‘setup_temp_extent_tree’ from ‘setup_temp_extent_buffer’
btrfs-progs-v6.17.1/convert/common.c:702:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:705:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:706:51: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:706:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:707:20: branch_false: following ‘false’ branch (when ‘bg_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:711:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:711:23: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  191|   	btrfs_set_header_owner(buf, owner);
#  192|   	btrfs_set_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN);
#  193|-> 	write_extent_buffer(buf, chunk_uuid, btrfs_header_chunk_tree_uuid(buf),
#  194|   			    BTRFS_UUID_SIZE);
#  195|   	write_extent_buffer(buf, fsid, btrfs_header_fsid(), BTRFS_FSID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
btrfs-progs-v6.17.1/convert/common.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/convert/common.c:535:12: enter_function: entry to ‘setup_temp_empty_tree’
btrfs-progs-v6.17.1/convert/common.c:541:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:542:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:544:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:544:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_empty_tree’
#  191|   	btrfs_set_header_owner(buf, owner);
#  192|   	btrfs_set_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN);
#  193|-> 	write_extent_buffer(buf, chunk_uuid, btrfs_header_chunk_tree_uuid(buf),
#  194|   			    BTRFS_UUID_SIZE);
#  195|   	write_extent_buffer(buf, fsid, btrfs_header_fsid(), BTRFS_FSID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
btrfs-progs-v6.17.1/convert/common.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of ‘extent_buf’
btrfs-progs-v6.17.1/convert/common.c:676:12: enter_function: entry to ‘setup_temp_extent_tree’
btrfs-progs-v6.17.1/convert/common.c:691:9: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/common.c:694:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:695:12: branch_false: following ‘false’ branch (when ‘extent_buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:700:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:700:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘setup_temp_extent_tree’
#  191|   	btrfs_set_header_owner(buf, owner);
#  192|   	btrfs_set_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN);
#  193|-> 	write_extent_buffer(buf, chunk_uuid, btrfs_header_chunk_tree_uuid(buf),
#  194|   			    BTRFS_UUID_SIZE);
#  195|   	write_extent_buffer(buf, fsid, btrfs_header_fsid(), BTRFS_FSID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
btrfs-progs-v6.17.1/convert/common.c:193:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/convert/common.c:563:12: enter_function: entry to ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:607:12: branch_true: following ‘true’ branch (when ‘skinny_metadata != 0’)...
btrfs-progs-v6.17.1/convert/common.c:608:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:617:12: branch_false: following ‘false’ branch (when ‘skinny_metadata == 0’)...
btrfs-progs-v6.17.1/convert/common.c:625:37: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:625:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/common.c:626:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:628:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:628:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘insert_temp_extent_item’
#  191|   	btrfs_set_header_owner(buf, owner);
#  192|   	btrfs_set_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN);
#  193|-> 	write_extent_buffer(buf, chunk_uuid, btrfs_header_chunk_tree_uuid(buf),
#  194|   			    BTRFS_UUID_SIZE);
#  195|   	write_extent_buffer(buf, fsid, btrfs_header_fsid(), BTRFS_FSID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
btrfs-progs-v6.17.1/convert/main.c:205:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/convert/main.c:199:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:200:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/convert/main.c:200:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:202:26: branch_true: following ‘true’ branch (when ‘offset < num_bytes’)...
btrfs-progs-v6.17.1/convert/main.c:203:21: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:205:23: throw: if ‘read_data_from_disk’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:205:23: danger: ‘buffer’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  203|   		u64 read_len = blocksize;
#  204|   
#  205|-> 		ret = read_data_from_disk(fs_info, buffer,
#  206|   					  disk_bytenr + offset, &read_len, 0);
#  207|   		if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
btrfs-progs-v6.17.1/convert/main.c:417:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/convert/main.c:387:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:390:25: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:391:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:393:27: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:394:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:396:27: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:398:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:406:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:408:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:411:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:411:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:412:20: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/convert/main.c:417:23: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:417:23: throw: if ‘pread’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:417:23: danger: ‘buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/10)
#  415|   		}
#  416|   
#  417|-> 		ret = pread(fd, buf, cur_len, cur_off);
#  418|   		if (ret < cur_len) {
#  419|   			ret = (ret < 0 ? ret : -EIO);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
btrfs-progs-v6.17.1/convert/main.c:1522:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1520|   	key.offset = 0;
# 1521|   
# 1522|-> 	ret = btrfs_search_slot(NULL, image_root, &key, &path, 0, 0);
# 1523|   	/*
# 1524|   	 * It's possible that some fs doesn't store any (including sb)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
btrfs-progs-v6.17.1/convert/main.c:1522:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1520|   	key.offset = 0;
# 1521|   
# 1522|-> 	ret = btrfs_search_slot(NULL, image_root, &key, &path, 0, 0);
# 1523|   	/*
# 1524|   	 * It's possible that some fs doesn't store any (including sb)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
btrfs-progs-v6.17.1/convert/main.c:1522:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1520|   	key.offset = 0;
# 1521|   
# 1522|-> 	ret = btrfs_search_slot(NULL, image_root, &key, &path, 0, 0);
# 1523|   	/*
# 1524|   	 * It's possible that some fs doesn't store any (including sb)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
btrfs-progs-v6.17.1/convert/main.c:1531:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1529|   	if (ret < 0) {
# 1530|   		errno = -ret;
# 1531|-> 		error("failed to iterate file extents at offset 0: %m");
# 1532|   		btrfs_release_path(&path);
# 1533|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
btrfs-progs-v6.17.1/convert/main.c:1531:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1529|   	if (ret < 0) {
# 1530|   		errno = -ret;
# 1531|-> 		error("failed to iterate file extents at offset 0: %m");
# 1532|   		btrfs_release_path(&path);
# 1533|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
btrfs-progs-v6.17.1/convert/main.c:1531:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1529|   	if (ret < 0) {
# 1530|   		errno = -ret;
# 1531|-> 		error("failed to iterate file extents at offset 0: %m");
# 1532|   		btrfs_release_path(&path);
# 1533|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
btrfs-progs-v6.17.1/convert/main.c:1532:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1530|   		errno = -ret;
# 1531|   		error("failed to iterate file extents at offset 0: %m");
# 1532|-> 		btrfs_release_path(&path);
# 1533|   		return ret;
# 1534|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
btrfs-progs-v6.17.1/convert/main.c:1532:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1530|   		errno = -ret;
# 1531|   		error("failed to iterate file extents at offset 0: %m");
# 1532|-> 		btrfs_release_path(&path);
# 1533|   		return ret;
# 1534|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
btrfs-progs-v6.17.1/convert/main.c:1532:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1530|   		errno = -ret;
# 1531|   		error("failed to iterate file extents at offset 0: %m");
# 1532|-> 		btrfs_release_path(&path);
# 1533|   		return ret;
# 1534|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
btrfs-progs-v6.17.1/convert/main.c:1705:14: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1705:14: throw: if ‘open’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1705:14: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
# 1703|   		}
# 1704|   	}
# 1705|-> 	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|   		error("unable to open %s: %m", devname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
btrfs-progs-v6.17.1/convert/main.c:1705:14: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1705:14: throw: if ‘open’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1705:14: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/6)
# 1703|   		}
# 1704|   	}
# 1705|-> 	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|   		error("unable to open %s: %m", devname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
btrfs-progs-v6.17.1/convert/main.c:1705:14: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1705:14: throw: if ‘open’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1705:14: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/10)
# 1703|   		}
# 1704|   	}
# 1705|-> 	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|   		error("unable to open %s: %m", devname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
btrfs-progs-v6.17.1/convert/main.c:1707:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1707:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1707:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1707:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
# 1705|   	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|-> 		error("unable to open %s: %m", devname);
# 1708|   		ret = -EIO;
# 1709|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
btrfs-progs-v6.17.1/convert/main.c:1707:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1707:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1707:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1707:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/6)
# 1705|   	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|-> 		error("unable to open %s: %m", devname);
# 1708|   		ret = -EIO;
# 1709|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
btrfs-progs-v6.17.1/convert/main.c:1707:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1707:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1707:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1707:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/10)
# 1705|   	fd = open(devname, O_RDWR);
# 1706|   	if (fd < 0) {
# 1707|-> 		error("unable to open %s: %m", devname);
# 1708|   		ret = -EIO;
# 1709|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
btrfs-progs-v6.17.1/convert/main.c:1718:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1718:16: throw: if ‘open_ctree_fd’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1718:16: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
# 1716|   	 * filesystem.
# 1717|   	 */
# 1718|-> 	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|   		error("unable to open ctree");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
btrfs-progs-v6.17.1/convert/main.c:1718:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1718:16: throw: if ‘open_ctree_fd’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1718:16: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/6)
# 1716|   	 * filesystem.
# 1717|   	 */
# 1718|-> 	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|   		error("unable to open ctree");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
btrfs-progs-v6.17.1/convert/main.c:1718:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1718:16: throw: if ‘open_ctree_fd’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1718:16: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/10)
# 1716|   	 * filesystem.
# 1717|   	 */
# 1718|-> 	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|   		error("unable to open ctree");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
btrfs-progs-v6.17.1/convert/main.c:1720:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1720:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1720:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1720:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/2)
# 1718|   	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|-> 		error("unable to open ctree");
# 1721|   		ret = -EIO;
# 1722|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
btrfs-progs-v6.17.1/convert/main.c:1720:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1720:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1720:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1720:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/6)
# 1718|   	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|-> 		error("unable to open ctree");
# 1721|   		ret = -EIO;
# 1722|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
btrfs-progs-v6.17.1/convert/main.c:1720:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1720:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1720:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1720:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/10)
# 1718|   	root = open_ctree_fd(fd, devname, 0, 0);
# 1719|   	if (!root) {
# 1720|-> 		error("unable to open ctree");
# 1721|   		ret = -EIO;
# 1722|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
btrfs-progs-v6.17.1/convert/main.c:1727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1727:9: throw: if ‘uuid_unparse’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1727:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
# 1725|   
# 1726|   	printf("  Label:           %s\n", fs_info->super_copy->label);
# 1727|-> 	uuid_unparse(fs_info->super_copy->fsid, fsid_str);
# 1728|   	printf("  UUID:            %s\n", fsid_str);
# 1729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
btrfs-progs-v6.17.1/convert/main.c:1727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1727:9: throw: if ‘uuid_unparse’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1727:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/6)
# 1725|   
# 1726|   	printf("  Label:           %s\n", fs_info->super_copy->label);
# 1727|-> 	uuid_unparse(fs_info->super_copy->fsid, fsid_str);
# 1728|   	printf("  UUID:            %s\n", fsid_str);
# 1729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
btrfs-progs-v6.17.1/convert/main.c:1727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1727:9: throw: if ‘uuid_unparse’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1727:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/10)
# 1725|   
# 1726|   	printf("  Label:           %s\n", fs_info->super_copy->label);
# 1727|-> 	uuid_unparse(fs_info->super_copy->fsid, fsid_str);
# 1728|   	printf("  UUID:            %s\n", fsid_str);
# 1729|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
btrfs-progs-v6.17.1/convert/main.c:1737:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1737:15: throw: if ‘btrfs_search_slot’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1737:15: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/2)
# 1735|   	key.type = BTRFS_ROOT_BACKREF_KEY;
# 1736|   	key.offset = BTRFS_FS_TREE_OBJECTID;
# 1737|-> 	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|   		error("unable to find source fs image subvolume, is it deleted?");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
btrfs-progs-v6.17.1/convert/main.c:1737:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1737:15: throw: if ‘btrfs_search_slot’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1737:15: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/6)
# 1735|   	key.type = BTRFS_ROOT_BACKREF_KEY;
# 1736|   	key.offset = BTRFS_FS_TREE_OBJECTID;
# 1737|-> 	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|   		error("unable to find source fs image subvolume, is it deleted?");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
btrfs-progs-v6.17.1/convert/main.c:1737:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1737:15: throw: if ‘btrfs_search_slot’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1737:15: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/10)
# 1735|   	key.type = BTRFS_ROOT_BACKREF_KEY;
# 1736|   	key.offset = BTRFS_FS_TREE_OBJECTID;
# 1737|-> 	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|   		error("unable to find source fs image subvolume, is it deleted?");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
btrfs-progs-v6.17.1/convert/main.c:1739:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1739:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1739:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1739:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/2)
# 1737|   	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|-> 		error("unable to find source fs image subvolume, is it deleted?");
# 1740|   		ret = -ENOENT;
# 1741|   		goto close_fs;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
btrfs-progs-v6.17.1/convert/main.c:1739:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1739:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1739:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1739:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/6)
# 1737|   	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|-> 		error("unable to find source fs image subvolume, is it deleted?");
# 1740|   		ret = -ENOENT;
# 1741|   		goto close_fs;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
btrfs-progs-v6.17.1/convert/main.c:1739:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1739:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1739:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1739:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/10)
# 1737|   	ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, &path, 0, 0);
# 1738|   	if (ret > 0) {
# 1739|-> 		error("unable to find source fs image subvolume, is it deleted?");
# 1740|   		ret = -ENOENT;
# 1741|   		goto close_fs;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
btrfs-progs-v6.17.1/convert/main.c:1744:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1743:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1744:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1744:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/2)
# 1742|   	} else if (ret < 0) {
# 1743|   		errno = -ret;
# 1744|-> 		error("failed to find source fs image subvolume: %m");
# 1745|   		goto close_fs;
# 1746|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
btrfs-progs-v6.17.1/convert/main.c:1744:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1743:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1744:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1744:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/6)
# 1742|   	} else if (ret < 0) {
# 1743|   		errno = -ret;
# 1744|-> 		error("failed to find source fs image subvolume: %m");
# 1745|   		goto close_fs;
# 1746|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
btrfs-progs-v6.17.1/convert/main.c:1744:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1743:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1744:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1744:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/10)
# 1742|   	} else if (ret < 0) {
# 1743|   		errno = -ret;
# 1744|-> 		error("failed to find source fs image subvolume: %m");
# 1745|   		goto close_fs;
# 1746|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
btrfs-progs-v6.17.1/convert/main.c:1753:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1753:9: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1753:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/2)
# 1751|   	if (name_len > sizeof(dir_name))
# 1752|   		name_len = sizeof(dir_name) - 1;
# 1753|-> 	read_extent_buffer(path.nodes[0], dir_name, (unsigned long)(root_ref_item + 1), name_len);
# 1754|   	dir_name[name_len] = 0;
# 1755|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
btrfs-progs-v6.17.1/convert/main.c:1753:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1753:9: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1753:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/6)
# 1751|   	if (name_len > sizeof(dir_name))
# 1752|   		name_len = sizeof(dir_name) - 1;
# 1753|-> 	read_extent_buffer(path.nodes[0], dir_name, (unsigned long)(root_ref_item + 1), name_len);
# 1754|   	dir_name[name_len] = 0;
# 1755|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
btrfs-progs-v6.17.1/convert/main.c:1753:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1753:9: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1753:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/10)
# 1751|   	if (name_len > sizeof(dir_name))
# 1752|   		name_len = sizeof(dir_name) - 1;
# 1753|-> 	read_extent_buffer(path.nodes[0], dir_name, (unsigned long)(root_ref_item + 1), name_len);
# 1754|   	dir_name[name_len] = 0;
# 1755|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
btrfs-progs-v6.17.1/convert/main.c:1758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1758:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1758:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/2)
# 1756|   	printf("  Restoring from:  %s/%s\n", dir_name, image_name);
# 1757|   
# 1758|-> 	btrfs_release_path(&path);
# 1759|   
# 1760|   	/* Search convert subvolume */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
btrfs-progs-v6.17.1/convert/main.c:1758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1758:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1758:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/6)
# 1756|   	printf("  Restoring from:  %s/%s\n", dir_name, image_name);
# 1757|   
# 1758|-> 	btrfs_release_path(&path);
# 1759|   
# 1760|   	/* Search convert subvolume */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
btrfs-progs-v6.17.1/convert/main.c:1758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1751:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1753:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1758:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1758:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/10)
# 1756|   	printf("  Restoring from:  %s/%s\n", dir_name, image_name);
# 1757|   
# 1758|-> 	btrfs_release_path(&path);
# 1759|   
# 1760|   	/* Search convert subvolume */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
btrfs-progs-v6.17.1/convert/main.c:1764:22: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1764:22: throw: if ‘btrfs_read_fs_root’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1764:22: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/2)
# 1762|   	key.type = BTRFS_ROOT_ITEM_KEY;
# 1763|   	key.offset = (u64)-1;
# 1764|-> 	image_root = btrfs_read_fs_root(fs_info, &key);
# 1765|   	if (IS_ERR(image_root)) {
# 1766|   		ret = PTR_ERR(image_root);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
btrfs-progs-v6.17.1/convert/main.c:1764:22: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1764:22: throw: if ‘btrfs_read_fs_root’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1764:22: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/6)
# 1762|   	key.type = BTRFS_ROOT_ITEM_KEY;
# 1763|   	key.offset = (u64)-1;
# 1764|-> 	image_root = btrfs_read_fs_root(fs_info, &key);
# 1765|   	if (IS_ERR(image_root)) {
# 1766|   		ret = PTR_ERR(image_root);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
btrfs-progs-v6.17.1/convert/main.c:1764:22: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1764:22: throw: if ‘btrfs_read_fs_root’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1764:22: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/10)
# 1762|   	key.type = BTRFS_ROOT_ITEM_KEY;
# 1763|   	key.offset = (u64)-1;
# 1764|-> 	image_root = btrfs_read_fs_root(fs_info, &key);
# 1765|   	if (IS_ERR(image_root)) {
# 1766|   		ret = PTR_ERR(image_root);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
btrfs-progs-v6.17.1/convert/main.c:1768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1766:23: call_function: inlined call to ‘PTR_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1768:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1768:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/3)
# 1766|   		ret = PTR_ERR(image_root);
# 1767|   		errno = -ret;
# 1768|-> 		error("failed to open convert image subvolume: %m");
# 1769|   		goto close_fs;
# 1770|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
btrfs-progs-v6.17.1/convert/main.c:1768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1766:23: call_function: inlined call to ‘PTR_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1768:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1768:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/7)
# 1766|   		ret = PTR_ERR(image_root);
# 1767|   		errno = -ret;
# 1768|-> 		error("failed to open convert image subvolume: %m");
# 1769|   		goto close_fs;
# 1770|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
btrfs-progs-v6.17.1/convert/main.c:1768:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1766:23: call_function: inlined call to ‘PTR_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1768:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1768:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/11)
# 1766|   		ret = PTR_ERR(image_root);
# 1767|   		errno = -ret;
# 1768|-> 		error("failed to open convert image subvolume: %m");
# 1769|   		goto close_fs;
# 1770|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
btrfs-progs-v6.17.1/convert/main.c:1774:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1774:15: throw: if ‘btrfs_lookup_dir_item’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1774:15: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/3)
# 1772|   	/* Search the image file */
# 1773|   	root_dir = btrfs_root_dirid(&image_root->root_item);
# 1774|-> 	dir = btrfs_lookup_dir_item(NULL, image_root, &path, root_dir,
# 1775|   			image_name, strlen(image_name), 0);
# 1776|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
btrfs-progs-v6.17.1/convert/main.c:1774:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1774:15: throw: if ‘btrfs_lookup_dir_item’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1774:15: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/7)
# 1772|   	/* Search the image file */
# 1773|   	root_dir = btrfs_root_dirid(&image_root->root_item);
# 1774|-> 	dir = btrfs_lookup_dir_item(NULL, image_root, &path, root_dir,
# 1775|   			image_name, strlen(image_name), 0);
# 1776|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
btrfs-progs-v6.17.1/convert/main.c:1774:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1774:15: throw: if ‘btrfs_lookup_dir_item’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1774:15: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/11)
# 1772|   	/* Search the image file */
# 1773|   	root_dir = btrfs_root_dirid(&image_root->root_item);
# 1774|-> 	dir = btrfs_lookup_dir_item(NULL, image_root, &path, root_dir,
# 1775|   			image_name, strlen(image_name), 0);
# 1776|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
btrfs-progs-v6.17.1/convert/main.c:1778:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1778:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1778:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/3)
# 1776|   
# 1777|   	if (!dir || IS_ERR(dir)) {
# 1778|-> 		btrfs_release_path(&path);
# 1779|   		if (dir)
# 1780|   			ret = PTR_ERR(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
btrfs-progs-v6.17.1/convert/main.c:1778:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1778:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1778:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/75/codeFlows/0/threadFlows/0/locations/7)
# 1776|   
# 1777|   	if (!dir || IS_ERR(dir)) {
# 1778|-> 		btrfs_release_path(&path);
# 1779|   		if (dir)
# 1780|   			ret = PTR_ERR(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
btrfs-progs-v6.17.1/convert/main.c:1778:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1778:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1778:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/76/codeFlows/0/threadFlows/0/locations/11)
# 1776|   
# 1777|   	if (!dir || IS_ERR(dir)) {
# 1778|-> 		btrfs_release_path(&path);
# 1779|   		if (dir)
# 1780|   			ret = PTR_ERR(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
btrfs-progs-v6.17.1/convert/main.c:1784:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1779:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1783:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1784:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1784:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/77/codeFlows/0/threadFlows/0/locations/3)
# 1782|   			ret = -ENOENT;
# 1783|   		errno = -ret;
# 1784|-> 		error("failed to locate file %s: %m", image_name);
# 1785|   		goto close_fs;
# 1786|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
btrfs-progs-v6.17.1/convert/main.c:1784:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1779:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1783:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1784:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1784:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/7)
# 1782|   			ret = -ENOENT;
# 1783|   		errno = -ret;
# 1784|-> 		error("failed to locate file %s: %m", image_name);
# 1785|   		goto close_fs;
# 1786|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
btrfs-progs-v6.17.1/convert/main.c:1784:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1779:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1783:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1784:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1784:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/11)
# 1782|   			ret = -ENOENT;
# 1783|   		errno = -ret;
# 1784|-> 		error("failed to locate file %s: %m", image_name);
# 1785|   		goto close_fs;
# 1786|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
btrfs-progs-v6.17.1/convert/main.c:1788:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1788:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1788:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/3)
# 1786|   	}
# 1787|   	btrfs_dir_item_key_to_cpu(path.nodes[0], dir, &key);
# 1788|-> 	btrfs_release_path(&path);
# 1789|   
# 1790|   	/* Get total size of the original image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
btrfs-progs-v6.17.1/convert/main.c:1788:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1788:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1788:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/7)
# 1786|   	}
# 1787|   	btrfs_dir_item_key_to_cpu(path.nodes[0], dir, &key);
# 1788|-> 	btrfs_release_path(&path);
# 1789|   
# 1790|   	/* Get total size of the original image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
btrfs-progs-v6.17.1/convert/main.c:1788:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1788:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1788:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/11)
# 1786|   	}
# 1787|   	btrfs_dir_item_key_to_cpu(path.nodes[0], dir, &key);
# 1788|-> 	btrfs_release_path(&path);
# 1789|   
# 1790|   	/* Get total size of the original image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
btrfs-progs-v6.17.1/convert/main.c:1793:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1793:15: throw: if ‘btrfs_lookup_inode’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1793:15: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/3)
# 1791|   	ino = key.objectid;
# 1792|   
# 1793|-> 	ret = btrfs_lookup_inode(NULL, image_root, &path, &key, 0);
# 1794|   
# 1795|   	if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
btrfs-progs-v6.17.1/convert/main.c:1793:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1793:15: throw: if ‘btrfs_lookup_inode’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1793:15: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/7)
# 1791|   	ino = key.objectid;
# 1792|   
# 1793|-> 	ret = btrfs_lookup_inode(NULL, image_root, &path, &key, 0);
# 1794|   
# 1795|   	if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
btrfs-progs-v6.17.1/convert/main.c:1793:15: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1793:15: throw: if ‘btrfs_lookup_inode’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1793:15: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/11)
# 1791|   	ino = key.objectid;
# 1792|   
# 1793|-> 	ret = btrfs_lookup_inode(NULL, image_root, &path, &key, 0);
# 1794|   
# 1795|   	if (ret < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
btrfs-progs-v6.17.1/convert/main.c:1796:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1796:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1796:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/3)
# 1794|   
# 1795|   	if (ret < 0) {
# 1796|-> 		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|   		error("unable to find inode %llu: %m", ino);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
btrfs-progs-v6.17.1/convert/main.c:1796:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1796:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1796:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/7)
# 1794|   
# 1795|   	if (ret < 0) {
# 1796|-> 		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|   		error("unable to find inode %llu: %m", ino);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
btrfs-progs-v6.17.1/convert/main.c:1796:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1796:17: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1796:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/11)
# 1794|   
# 1795|   	if (ret < 0) {
# 1796|-> 		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|   		error("unable to find inode %llu: %m", ino);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
btrfs-progs-v6.17.1/convert/main.c:1798:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1798:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1798:17: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/3)
# 1796|   		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|-> 		error("unable to find inode %llu: %m", ino);
# 1799|   		goto close_fs;
# 1800|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
btrfs-progs-v6.17.1/convert/main.c:1798:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1798:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1798:17: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/7)
# 1796|   		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|-> 		error("unable to find inode %llu: %m", ino);
# 1799|   		goto close_fs;
# 1800|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
btrfs-progs-v6.17.1/convert/main.c:1798:17: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/main.c:1796:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1798:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1798:17: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/11)
# 1796|   		btrfs_release_path(&path);
# 1797|   		errno = -ret;
# 1798|-> 		error("unable to find inode %llu: %m", ino);
# 1799|   		goto close_fs;
# 1800|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
btrfs-progs-v6.17.1/convert/main.c:1804:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1804:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1804:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/3)
# 1802|   				    struct btrfs_inode_item);
# 1803|   	total_bytes = btrfs_inode_size(path.nodes[0], inode_item);
# 1804|-> 	btrfs_release_path(&path);
# 1805|   
# 1806|   	/* Check if we can rollback the image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
btrfs-progs-v6.17.1/convert/main.c:1804:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1804:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1804:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/7)
# 1802|   				    struct btrfs_inode_item);
# 1803|   	total_bytes = btrfs_inode_size(path.nodes[0], inode_item);
# 1804|-> 	btrfs_release_path(&path);
# 1805|   
# 1806|   	/* Check if we can rollback the image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
btrfs-progs-v6.17.1/convert/main.c:1804:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1804:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1804:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/11)
# 1802|   				    struct btrfs_inode_item);
# 1803|   	total_bytes = btrfs_inode_size(path.nodes[0], inode_item);
# 1804|-> 	btrfs_release_path(&path);
# 1805|   
# 1806|   	/* Check if we can rollback the image */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
btrfs-progs-v6.17.1/convert/main.c:1813:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1813:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1813:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/2)
# 1811|   	}
# 1812|   close_fs:
# 1813|-> 	btrfs_release_path(&path);
# 1814|   	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
btrfs-progs-v6.17.1/convert/main.c:1813:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1813:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1813:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/6)
# 1811|   	}
# 1812|   close_fs:
# 1813|-> 	btrfs_release_path(&path);
# 1814|   	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
btrfs-progs-v6.17.1/convert/main.c:1813:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1813:9: throw: if ‘btrfs_release_path’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1813:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/10)
# 1811|   	}
# 1812|   close_fs:
# 1813|-> 	btrfs_release_path(&path);
# 1814|   	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
btrfs-progs-v6.17.1/convert/main.c:1814:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1814:9: throw: if ‘close_ctree_fs_info’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1814:9: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/2)
# 1812|   close_fs:
# 1813|   	btrfs_release_path(&path);
# 1814|-> 	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)
# 1816|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
btrfs-progs-v6.17.1/convert/main.c:1814:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1814:9: throw: if ‘close_ctree_fs_info’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1814:9: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(7)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/6)
# 1812|   close_fs:
# 1813|   	btrfs_release_path(&path);
# 1814|-> 	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)
# 1816|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
btrfs-progs-v6.17.1/convert/main.c:1814:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1814:9: throw: if ‘close_ctree_fs_info’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1814:9: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(11)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/10)
# 1812|   close_fs:
# 1813|   	btrfs_release_path(&path);
# 1814|-> 	close_ctree_fs_info(fs_info);
# 1815|   	if (ret)
# 1816|   		goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
btrfs-progs-v6.17.1/convert/main.c:1834:23: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1834:23: throw: if ‘pwrite’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1834:23: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/3)
# 1832|   
# 1833|   		real_size = min(range_end(range), fsize) - range->start;
# 1834|-> 		ret = pwrite(fd, reserved_ranges[i], real_size, range->start);
# 1835|   		if (ret < real_size) {
# 1836|   			if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
btrfs-progs-v6.17.1/convert/main.c:1834:23: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1834:23: throw: if ‘pwrite’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1834:23: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/7)
# 1832|   
# 1833|   		real_size = min(range_end(range), fsize) - range->start;
# 1834|-> 		ret = pwrite(fd, reserved_ranges[i], real_size, range->start);
# 1835|   		if (ret < real_size) {
# 1836|   			if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
btrfs-progs-v6.17.1/convert/main.c:1834:23: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1834:23: throw: if ‘pwrite’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1834:23: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/103/codeFlows/0/threadFlows/0/locations/11)
# 1832|   
# 1833|   		real_size = min(range_end(range), fsize) - range->start;
# 1834|-> 		ret = pwrite(fd, reserved_ranges[i], real_size, range->start);
# 1835|   		if (ret < real_size) {
# 1836|   			if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
btrfs-progs-v6.17.1/convert/main.c:1841:25: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1841:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1841:25: danger: ‘reserved_ranges[0]’ leaks here; was allocated at [(4)](sarif:/runs/0/results/104/codeFlows/0/threadFlows/0/locations/3)
# 1839|   				ret = -EIO;
# 1840|   			errno = -ret;
# 1841|-> 			error("failed to recover range [%llu, %llu): %m",
# 1842|   			      range->start, real_size);
# 1843|   			goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
btrfs-progs-v6.17.1/convert/main.c:1841:25: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1841:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1841:25: danger: ‘reserved_ranges[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/105/codeFlows/0/threadFlows/0/locations/7)
# 1839|   				ret = -EIO;
# 1840|   			errno = -ret;
# 1841|-> 			error("failed to recover range [%llu, %llu): %m",
# 1842|   			      range->start, real_size);
# 1843|   			goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
btrfs-progs-v6.17.1/convert/main.c:1841:25: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
btrfs-progs-v6.17.1/convert/main.c:1815:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1826:57: branch_true: following ‘true’ branch (when ‘i != -1’)...
btrfs-progs-v6.17.1/convert/main.c:1830:21: call_function: inlined call to ‘range_end’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1841:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1841:25: danger: ‘reserved_ranges[2]’ leaks here; was allocated at [(12)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/11)
# 1839|   				ret = -EIO;
# 1840|   			errno = -ret;
# 1841|-> 			error("failed to recover range [%llu, %llu): %m",
# 1842|   			      range->start, real_size);
# 1843|   			goto free_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
btrfs-progs-v6.17.1/convert/main.c:1988:39: warning[-Wanalyzer-malloc-leak]: leak of ‘orig’
btrfs-progs-v6.17.1/convert/main.c:1951:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/convert/main.c:1953:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1985:46: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1988:39: throw: if ‘btrfs_parse_fs_features’ throws an exception...
btrfs-progs-v6.17.1/convert/main.c:1988:39: danger: ‘orig’ leaks here; was allocated at [(3)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/2)
# 1986|   				char *tmp = orig;
# 1987|   
# 1988|-> 				tmp = btrfs_parse_fs_features(tmp, &features);
# 1989|   				if (tmp) {
# 1990|   					error("unrecognized filesystem feature: %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
btrfs-progs-v6.17.1/convert/source-ext2.c:454:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/convert/source-ext2.c:971:12: enter_function: entry to ‘ext2_copy_single_inode’
btrfs-progs-v6.17.1/convert/source-ext2.c:987:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:990:56: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:990:9: call_function: calling ‘ext2_copy_inode_item’ from ‘ext2_copy_single_inode’
btrfs-progs-v6.17.1/convert/source-ext2.c:990:9: return_function: returning to ‘ext2_copy_single_inode’ from ‘ext2_copy_inode_item’
btrfs-progs-v6.17.1/convert/source-ext2.c:1028:23: call_function: calling ‘ext2_create_file_extents’ from ‘ext2_copy_single_inode’
#  452|   		if (!buffer)
#  453|   			return -ENOMEM;
#  454|-> 		ret = read_disk_extent(root, disk_bytenr, num_bytes, buffer);
#  455|   		if (ret)
#  456|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
btrfs-progs-v6.17.1/convert/source-ext2.c:701:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ext2_inode’
btrfs-progs-v6.17.1/convert/source-ext2.c:1088:12: enter_function: entry to ‘ext2_copy_inodes’
btrfs-progs-v6.17.1/convert/source-ext2.c:1102:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1104:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1105:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1105:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1110:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1113:21: branch_true: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1113:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1118:23: call_function: calling ‘ext2_copy_single_inode’ from ‘ext2_copy_inodes’
#  699|   		       return -ENOMEM;
#  700|   	}
#  701|-> 	err = ext2fs_read_inode_full(ext2_fs, ext2_ino, (void *)ext2_inode,
#  702|   				     inode_size);
#  703|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
btrfs-progs-v6.17.1/convert/source-ext2.c:753:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/convert/source-ext2.c:1088:12: enter_function: entry to ‘ext2_copy_inodes’
btrfs-progs-v6.17.1/convert/source-ext2.c:1102:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1104:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1105:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1105:12: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1110:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1113:21: branch_true: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1113:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:1115:21: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:1118:23: call_function: calling ‘ext2_copy_single_inode’ from ‘ext2_copy_inodes’
#  751|   		goto out;
#  752|   	}
#  753|-> 	err = ext2fs_read_ext_attr2(ext2_fs, ext2_inode->i_file_acl, buffer);
#  754|   	if (err) {
#  755|   		error("ext2fs_read_ext_attr2: %s", error_message(err));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
btrfs-progs-v6.17.1/convert/source-ext2.c:882:15: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
btrfs-progs-v6.17.1/convert/source-ext2.c:971:12: enter_function: entry to ‘ext2_copy_single_inode’
btrfs-progs-v6.17.1/convert/source-ext2.c:987:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:990:56: branch_false: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:990:9: call_function: calling ‘ext2_copy_inode_item’ from ‘ext2_copy_single_inode’
btrfs-progs-v6.17.1/convert/source-ext2.c:990:9: return_function: returning to ‘ext2_copy_single_inode’ from ‘ext2_copy_inode_item’
btrfs-progs-v6.17.1/convert/source-ext2.c:991:24: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/convert/source-ext2.c:991:24: branch_true: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:992:12: branch_true: following ‘true’ branch (when ‘s_inode_size > 128’)...
btrfs-progs-v6.17.1/convert/source-ext2.c:993:23: branch_true: ...to here
btrfs-progs-v6.17.1/convert/source-ext2.c:993:23: call_function: calling ‘ext4_copy_inode_timespec_extra’ from ‘ext2_copy_single_inode’
#  880|   	if (!src)
#  881|   		return -ENOMEM;
#  882|-> 	err = ext2fs_read_inode_full(ext2_fs, ext2_ino, (void *)src,
#  883|   				     s_inode_size);
#  884|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def423]
btrfs-progs-v6.17.1/image/common.c:103:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘__builtin_alloca_with_align((sizetype)btrfs_csum_type_size(0), 8)’
#  101|   	crc = crc32c(crc, buf + BTRFS_CSUM_SIZE, len - BTRFS_CSUM_SIZE);
#  102|   	put_unaligned_le32(~crc, result);
#  103|-> 	memcpy(buf, result, csum_size);
#  104|   }
#  105|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
btrfs-progs-v6.17.1/image/image-create.c:192:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  190|   	int ret;
#  191|   
#  192|-> 	num_copies = btrfs_num_copies(root->fs_info, logical, bytes_left);
#  193|   
#  194|   	/* Try our best to read data, just like read_tree_block() */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
btrfs-progs-v6.17.1/image/image-create.c:192:22: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  190|   	int ret;
#  191|   
#  192|-> 	num_copies = btrfs_num_copies(root->fs_info, logical, bytes_left);
#  193|   
#  194|   	/* Try our best to read data, just like read_tree_block() */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def426]
btrfs-progs-v6.17.1/image/image-create.c:198:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  196|   		while (bytes_left) {
#  197|   			read_len = bytes_left;
#  198|-> 			ret = read_data_from_disk(fs_info,
#  199|   					(char *)(async->buffer + offset),
#  200|   					logical, &read_len, cur_mirror);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
btrfs-progs-v6.17.1/image/image-create.c:198:31: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  196|   		while (bytes_left) {
#  197|   			read_len = bytes_left;
#  198|-> 			ret = read_data_from_disk(fs_info,
#  199|   					(char *)(async->buffer + offset),
#  200|   					logical, &read_len, cur_mirror);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
btrfs-progs-v6.17.1/image/image-create.c:444:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  442|   			int fd = get_dev_fd(md->root);
#  443|   
#  444|-> 			ret = pread(fd, async->buffer, size, start);
#  445|   			if (ret < size) {
#  446|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
btrfs-progs-v6.17.1/image/image-create.c:444:31: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-create.c:591:12: enter_function: entry to ‘copy_log_trees’
btrfs-progs-v6.17.1/image/image-create.c:596:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:599:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:600:14: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:599:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:605:16: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:605:16: call_function: calling ‘copy_tree_blocks’ from ‘copy_log_trees’
#  442|   			int fd = get_dev_fd(md->root);
#  443|   
#  444|-> 			ret = pread(fd, async->buffer, size, start);
#  445|   			if (ret < size) {
#  446|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
btrfs-progs-v6.17.1/image/image-create.c:460:30: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-create.c:609:12: enter_function: entry to ‘copy_space_cache’
btrfs-progs-v6.17.1/image/image-create.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:631:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:661:23: call_function: calling ‘add_extent’ from ‘copy_space_cache’
#  458|   					size);
#  459|   
#  460|-> 			eb = read_tree_block(md->root->fs_info, start, &check);
#  461|   			if (!extent_buffer_uptodate(eb)) {
#  462|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
btrfs-progs-v6.17.1/image/image-create.c:460:30: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-create.c:609:12: enter_function: entry to ‘copy_space_cache’
btrfs-progs-v6.17.1/image/image-create.c:626:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-create.c:631:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-create.c:661:23: call_function: calling ‘add_extent’ from ‘copy_space_cache’
#  458|   					size);
#  459|   
#  460|-> 			eb = read_tree_block(md->root->fs_info, start, &check);
#  461|   			if (!extent_buffer_uptodate(eb)) {
#  462|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
btrfs-progs-v6.17.1/image/image-restore.c:53:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#   51|   	int i;
#   52|   
#   53|-> 	while ((n = rb_first(&mdres->chunk_tree))) {
#   54|   		struct fs_chunk *entry;
#   55|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
btrfs-progs-v6.17.1/image/image-restore.c:57:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#   55|   
#   56|   		entry = rb_entry(n, struct fs_chunk, l);
#   57|-> 		rb_erase(n, &mdres->chunk_tree);
#   58|   		rb_erase(&entry->p, &mdres->physical_tree);
#   59|   		free(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
btrfs-progs-v6.17.1/image/image-restore.c:58:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#   56|   		entry = rb_entry(n, struct fs_chunk, l);
#   57|   		rb_erase(n, &mdres->chunk_tree);
#   58|-> 		rb_erase(&entry->p, &mdres->physical_tree);
#   59|   		free(entry);
#   60|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
btrfs-progs-v6.17.1/image/image-restore.c:61:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#   59|   		free(entry);
#   60|   	}
#   61|-> 	free_extent_cache_tree(&mdres->sys_chunks);
#   62|   	pthread_mutex_lock(&mdres->mutex);
#   63|   	mdres->done = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
btrfs-progs-v6.17.1/image/image-restore.c:68:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#   66|   
#   67|   	for (i = 0; i < num_threads; i++)
#   68|-> 		pthread_join(mdres->threads[i], NULL);
#   69|   
#   70|   	pthread_cond_destroy(&mdres->cond);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
btrfs-progs-v6.17.1/image/image-restore.c:110:14: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_dummy_eb(0, nodesize)’
btrfs-progs-v6.17.1/image/image-restore.c:884:12: enter_function: entry to ‘read_chunk_block’
btrfs-progs-v6.17.1/image/image-restore.c:894:14: call_function: calling ‘alloc_dummy_eb’ from ‘read_chunk_block’
btrfs-progs-v6.17.1/image/image-restore.c:894:14: return_function: returning to ‘read_chunk_block’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/image-restore.c:895:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:895:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:898:30: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:899:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:900:22: call_function: calling ‘is_in_sys_chunks’ from ‘read_chunk_block’
#  108|   	struct extent_buffer *eb;
#  109|   
#  110|-> 	eb = calloc(1, sizeof(struct extent_buffer) + size);
#  111|   	if (!eb)
#  112|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
btrfs-progs-v6.17.1/image/image-restore.c:110:14: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_dummy_eb(bytenr, *mdres.nodesize)’
btrfs-progs-v6.17.1/image/image-restore.c:557:14: enter_function: entry to ‘restore_worker’
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:577:24: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:587:23: call_function: calling ‘restore_one_work’ from ‘restore_worker’
#  108|   	struct extent_buffer *eb;
#  109|   
#  110|-> 	eb = calloc(1, sizeof(struct extent_buffer) + size);
#  111|   	if (!eb)
#  112|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
btrfs-progs-v6.17.1/image/image-restore.c:432:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:557:14: enter_function: entry to ‘restore_worker’
btrfs-progs-v6.17.1/image/image-restore.c:565:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:577:24: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:587:23: call_function: calling ‘restore_one_work’ from ‘restore_worker’
#  430|   		ret = inflateInit(&strm);
#  431|   		if (ret != Z_OK) {
#  432|-> 			error("failed to initialize decompress parameters: %d", ret);
#  433|   			return ret;
#  434|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
btrfs-progs-v6.17.1/image/image-restore.c:447:31: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:557:14: enter_function: entry to ‘restore_worker’
btrfs-progs-v6.17.1/image/image-restore.c:565:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:577:24: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:587:23: call_function: calling ‘restore_one_work’ from ‘restore_worker’
#  445|   			}
#  446|   			pthread_mutex_unlock(&mdres->mutex);
#  447|-> 			ret = inflate(&strm, Z_NO_FLUSH);
#  448|   			pthread_mutex_lock(&mdres->mutex);
#  449|   			switch (ret) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def441]
btrfs-progs-v6.17.1/image/image-restore.c:473:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:557:14: enter_function: entry to ‘restore_worker’
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:566:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:577:24: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:587:23: call_function: calling ‘restore_one_work’ from ‘restore_worker’
#  471|   		if (!mdres->multi_devices) {
#  472|   			if (async->start == BTRFS_SUPER_INFO_OFFSET) {
#  473|-> 				memcpy(mdres->original_super, buffer,
#  474|   				       BTRFS_SUPER_INFO_SIZE);
#  475|   				if (mdres->old_restore) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
btrfs-progs-v6.17.1/image/image-restore.c:611:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#  609|   	int i, ret = 0;
#  610|   
#  611|-> 	ret = detect_version(in);
#  612|   	if (ret < 0)
#  613|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
btrfs-progs-v6.17.1/image/image-restore.c:619:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1778:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1810:15: call_function: calling ‘mdrestore_init’ from ‘restore_metadump’
#  617|   	INIT_LIST_HEAD(&mdres->list);
#  618|   	INIT_LIST_HEAD(&mdres->overlapping_chunks);
#  619|-> 	cache_tree_init(&mdres->sys_chunks);
#  620|   	mdres->in = in;
#  621|   	mdres->out = out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
btrfs-progs-v6.17.1/image/image-restore.c:759:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_chunk’
btrfs-progs-v6.17.1/image/image-restore.c:781:12: enter_function: entry to ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:786:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:792:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:796:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:797:20: branch_false: following ‘false’ branch (when ‘fs_chunk’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:801:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:809:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:813:25: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:813:25: call_function: calling ‘tree_insert’ from ‘read_chunk_tree_block’
#  757|   
#  758|   	rb_link_node(ins, parent, p);
#  759|-> 	rb_insert_color(ins, root);
#  760|   }
#  761|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
btrfs-progs-v6.17.1/image/image-restore.c:872:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: call_function: calling ‘is_in_sys_chunks’ from ‘search_for_chunk_blocks’
#  870|   	if (start > entry->start) {
#  871|   		prev = entry;
#  872|-> 		next = next_cache_extent(entry);
#  873|   	} else {
#  874|   		prev = prev_cache_extent(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
btrfs-progs-v6.17.1/image/image-restore.c:872:24: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: call_function: calling ‘is_in_sys_chunks’ from ‘search_for_chunk_blocks’
#  870|   	if (start > entry->start) {
#  871|   		prev = entry;
#  872|-> 		next = next_cache_extent(entry);
#  873|   	} else {
#  874|   		prev = prev_cache_extent(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
btrfs-progs-v6.17.1/image/image-restore.c:872:24: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_false: following ‘false’ branch (when ‘i >= nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1086:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_false: following ‘false’ branch (when ‘max_size >= bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: call_function: calling ‘is_in_sys_chunks’ from ‘search_for_chunk_blocks’
#  870|   	if (start > entry->start) {
#  871|   		prev = entry;
#  872|-> 		next = next_cache_extent(entry);
#  873|   	} else {
#  874|   		prev = prev_cache_extent(entry);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
btrfs-progs-v6.17.1/image/image-restore.c:874:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: call_function: calling ‘is_in_sys_chunks’ from ‘search_for_chunk_blocks’
#  872|   		next = next_cache_extent(entry);
#  873|   	} else {
#  874|-> 		prev = prev_cache_extent(entry);
#  875|   		next = entry;
#  876|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
btrfs-progs-v6.17.1/image/image-restore.c:874:24: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1035:30: call_function: calling ‘is_in_sys_chunks’ from ‘search_for_chunk_blocks’
#  872|   		next = next_cache_extent(entry);
#  873|   	} else {
#  874|-> 		prev = prev_cache_extent(entry);
#  875|   		next = entry;
#  876|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
btrfs-progs-v6.17.1/image/image-restore.c:904:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1055:33: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1059:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1076:31: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1076:31: call_function: calling ‘read_chunk_block’ from ‘search_for_chunk_blocks’
#  902|   		memcpy(eb->data, buffer + cur_offset, nodesize);
#  903|   		if (btrfs_header_bytenr(eb) != bytenr) {
#  904|-> 			error(
#  905|   			"eb bytenr does not match found bytenr: %llu != %llu",
#  906|   				btrfs_header_bytenr(eb), bytenr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
btrfs-progs-v6.17.1/image/image-restore.c:913:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:946:12: enter_function: entry to ‘search_for_chunk_blocks’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1055:33: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1059:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1076:31: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1076:31: call_function: calling ‘read_chunk_block’ from ‘search_for_chunk_blocks’
#  911|   			   offsetof(struct btrfs_header, fsid),
#  912|   			   BTRFS_FSID_SIZE)) {
#  913|-> 			error(
#  914|   			"filesystem metadata UUID of eb %llu does not match",
#  915|   				bytenr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
btrfs-progs-v6.17.1/image/image-restore.c:966:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_true: following ‘true’ branch (when ‘buffer’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:966:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:966:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:966:17: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
#  964|   	buffer = malloc(max_size);
#  965|   	if (!buffer) {
#  966|-> 		error_mem(NULL);
#  967|   		free(cluster);
#  968|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
btrfs-progs-v6.17.1/image/image-restore.c:974:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_true: following ‘true’ branch (when ‘tmp’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:974:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:974:25: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:974:25: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
#  972|   		tmp = malloc(max_size);
#  973|   		if (!tmp) {
#  974|-> 			error_mem(NULL);
#  975|   			free(cluster);
#  976|   			free(buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
btrfs-progs-v6.17.1/image/image-restore.c:974:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_true: following ‘true’ branch (when ‘tmp’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:974:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:974:25: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:974:25: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
#  972|   		tmp = malloc(max_size);
#  973|   		if (!tmp) {
#  974|-> 			error_mem(NULL);
#  975|   			free(cluster);
#  976|   			free(buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
btrfs-progs-v6.17.1/image/image-restore.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:21: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:984:21: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
#  982|   	/* Main loop, iterating all clusters */
#  983|   	while (1) {
#  984|-> 		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|   			error("seek failed: %m");
#  986|   			ret = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
btrfs-progs-v6.17.1/image/image-restore.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:21: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:984:21: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
#  982|   	/* Main loop, iterating all clusters */
#  983|   	while (1) {
#  984|-> 		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|   			error("seek failed: %m");
#  986|   			ret = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
btrfs-progs-v6.17.1/image/image-restore.c:984:21: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:21: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:984:21: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/6)
#  982|   	/* Main loop, iterating all clusters */
#  983|   	while (1) {
#  984|-> 		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|   			error("seek failed: %m");
#  986|   			ret = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
btrfs-progs-v6.17.1/image/image-restore.c:985:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:985:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  983|   	while (1) {
#  984|   		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|-> 			error("seek failed: %m");
#  986|   			ret = -EIO;
#  987|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
btrfs-progs-v6.17.1/image/image-restore.c:985:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:985:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
#  983|   	while (1) {
#  984|   		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|-> 			error("seek failed: %m");
#  986|   			ret = -EIO;
#  987|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
btrfs-progs-v6.17.1/image/image-restore.c:985:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:985:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:985:25: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/6)
#  983|   	while (1) {
#  984|   		if (fseek(mdres->in, current_cluster, SEEK_SET)) {
#  985|-> 			error("seek failed: %m");
#  986|   			ret = -EIO;
#  987|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
btrfs-progs-v6.17.1/image/image-restore.c:994:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:992:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:994:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/2)
#  992|   			if (feof(mdres->in))
#  993|   				goto out;
#  994|-> 			error(
#  995|   	"unknown state after reading cluster at %llu, probably corrupted data",
#  996|   					current_cluster);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
btrfs-progs-v6.17.1/image/image-restore.c:994:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:992:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:994:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/0)
#  992|   			if (feof(mdres->in))
#  993|   				goto out;
#  994|-> 			error(
#  995|   	"unknown state after reading cluster at %llu, probably corrupted data",
#  996|   					current_cluster);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
btrfs-progs-v6.17.1/image/image-restore.c:994:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:992:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:994:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:994:25: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/6)
#  992|   			if (feof(mdres->in))
#  993|   				goto out;
#  994|-> 			error(
#  995|   	"unknown state after reading cluster at %llu, probably corrupted data",
#  996|   					current_cluster);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
#  998|   			goto out;
#  999|   		} else if (ret < 0) {
# 1000|-> 			error("unable to read image at %llu: %m",
# 1001|   					current_cluster);
# 1002|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/0)
#  998|   			goto out;
#  999|   		} else if (ret < 0) {
# 1000|-> 			error("unable to read image at %llu: %m",
# 1001|   					current_cluster);
# 1002|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1000:25: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/6)
#  998|   			goto out;
#  999|   		} else if (ret < 0) {
# 1000|-> 			error("unable to read image at %llu: %m",
# 1001|   					current_cluster);
# 1002|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
# 1007|   		if (get_unaligned_le64(&header->magic) != current_version->magic_cpu ||
# 1008|   		    get_unaligned_le64(&header->bytenr) != current_cluster) {
# 1009|-> 			error("bad header in metadump image");
# 1010|   			ret = -EIO;
# 1011|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/0)
# 1007|   		if (get_unaligned_le64(&header->magic) != current_version->magic_cpu ||
# 1008|   		    get_unaligned_le64(&header->bytenr) != current_cluster) {
# 1009|-> 			error("bad header in metadump image");
# 1010|   			ret = -EIO;
# 1011|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1009:25: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/6)
# 1007|   		if (get_unaligned_le64(&header->magic) != current_version->magic_cpu ||
# 1008|   		    get_unaligned_le64(&header->bytenr) != current_cluster) {
# 1009|-> 			error("bad header in metadump image");
# 1010|   			ret = -EIO;
# 1011|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
# 1035|   			    !is_in_sys_chunks(mdres, item_bytenr, bufsize) ||
# 1036|   			    item_bytenr == BTRFS_SUPER_INFO_OFFSET) {
# 1037|-> 				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|   					error("failed to seek: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/0)
# 1035|   			    !is_in_sys_chunks(mdres, item_bytenr, bufsize) ||
# 1036|   			    item_bytenr == BTRFS_SUPER_INFO_OFFSET) {
# 1037|-> 				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|   					error("failed to seek: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: throw: if ‘fseek’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/6)
# 1035|   			    !is_in_sys_chunks(mdres, item_bytenr, bufsize) ||
# 1036|   			    item_bytenr == BTRFS_SUPER_INFO_OFFSET) {
# 1037|-> 				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|   					error("failed to seek: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/2)
# 1037|   				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|-> 					error("failed to seek: %m");
# 1040|   					ret = -errno;
# 1041|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/0)
# 1037|   				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|-> 					error("failed to seek: %m");
# 1040|   					ret = -errno;
# 1041|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:972:23: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:972:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:973:20: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1039:41: danger: ‘tmp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/6)
# 1037|   				ret = fseek(mdres->in, bufsize, SEEK_CUR);
# 1038|   				if (ret < 0) {
# 1039|-> 					error("failed to seek: %m");
# 1040|   					ret = -errno;
# 1041|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/2)
# 1048|   				ret = fread(tmp, bufsize, 1, mdres->in);
# 1049|   				if (ret != 1) {
# 1050|-> 					error("read error: %m");
# 1051|   					ret = -EIO;
# 1052|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1050:41: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/0)
# 1048|   				ret = fread(tmp, bufsize, 1, mdres->in);
# 1049|   				if (ret != 1) {
# 1050|-> 					error("read error: %m");
# 1051|   					ret = -EIO;
# 1052|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1055:33: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: throw: if ‘uncompress’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/2)
# 1054|   
# 1055|   				size = max_size;
# 1056|-> 				ret = uncompress(buffer,
# 1057|   						 (unsigned long *)&size, tmp,
# 1058|   						 bufsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def479]
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1055:33: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: throw: if ‘uncompress’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1056:39: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/0)
# 1054|   
# 1055|   				size = max_size;
# 1056|-> 				ret = uncompress(buffer,
# 1057|   						 (unsigned long *)&size, tmp,
# 1058|   						 bufsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def480]
btrfs-progs-v6.17.1/image/image-restore.c:1060:41: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1048:62: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1049:36: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1055:33: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1059:36: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1060:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1060:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1060:41: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/0)
# 1058|   						 bufsize);
# 1059|   				if (ret != Z_OK) {
# 1060|-> 					error("decompression failed with %d",
# 1061|   							ret);
# 1062|   					ret = -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def481]
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:964:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1066:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1067:36: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/2)
# 1066|   				ret = fread(buffer, bufsize, 1, mdres->in);
# 1067|   				if (ret != 1) {
# 1068|-> 					error("read error: %m");
# 1069|   					ret = -EIO;
# 1070|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def482]
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: warning[-Wanalyzer-malloc-leak]: leak of ‘cluster’
btrfs-progs-v6.17.1/image/image-restore.c:958:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:959:12: branch_false: following ‘false’ branch (when ‘cluster’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:964:18: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:965:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:971:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:971:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1022:29: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1026:35: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:28: branch_true: following ‘true’ branch (when ‘max_size < bufsize’)...
btrfs-progs-v6.17.1/image/image-restore.c:1037:39: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1038:36: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1043:40: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:984:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:990:59: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:991:20: branch_false: following ‘false’ branch (when ‘ret != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:999:27: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1008:21: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1007:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1015:39: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1015:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1018:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1034:29: branch_false: following ‘false’ branch (when ‘item_bytenr != 65536’)...
btrfs-progs-v6.17.1/image/image-restore.c:1047:29: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1047:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1066:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1067:36: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1068:41: danger: ‘cluster’ leaks here; was allocated at [(1)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/0)
# 1066|   				ret = fread(buffer, bufsize, 1, mdres->in);
# 1067|   				if (ret != 1) {
# 1068|-> 					error("read error: %m");
# 1069|   					ret = -EIO;
# 1070|   					goto out;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def483]
btrfs-progs-v6.17.1/image/image-restore.c:1140:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_false: following ‘false’ branch (when ‘i >= nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_true: following ‘true’ branch (when ‘item’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1140:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1140:17: danger: dereference of NULL ‘item’
# 1138|   
# 1139|   	if (!item || get_unaligned_le64(&item->bytenr) != BTRFS_SUPER_INFO_OFFSET) {
# 1140|-> 		error("did not find superblock at %llu", get_unaligned_le64(&item->bytenr));
# 1141|   		return -EINVAL;
# 1142|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def484]
btrfs-progs-v6.17.1/image/image-restore.c:1152:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1129:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1144:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1145:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1150:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1151:12: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1152:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1152:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1152:17: danger: ‘buffer’ leaks here; was allocated at [(13)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/12)
# 1150|   	ret = fread(buffer, get_unaligned_le32(&item->size), 1, mdres->in);
# 1151|   	if (ret != 1) {
# 1152|-> 		error("unable to read buffer: %m");
# 1153|   		free(buffer);
# 1154|   		return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1129:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1144:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1145:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1150:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1151:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1157:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1157:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1158:24: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1162:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1166:71: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: throw: if ‘uncompress’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: danger: ‘buffer’ leaks here; was allocated at [(13)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/12)
# 1164|   			return -ENOMEM;
# 1165|   		}
# 1166|-> 		ret = uncompress(tmp, (unsigned long *)&size, buffer, get_unaligned_le32(&item->size));
# 1167|   		if (ret != Z_OK) {
# 1168|   			error("decompression failed with %d", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1129:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1145:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1150:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1151:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1157:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1157:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1158:24: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1161:23: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1162:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1166:71: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: throw: if ‘uncompress’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1166:23: danger: ‘tmp’ leaks here; was allocated at [(19)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/18)
# 1164|   			return -ENOMEM;
# 1165|   		}
# 1166|-> 		ret = uncompress(tmp, (unsigned long *)&size, buffer, get_unaligned_le32(&item->size));
# 1167|   		if (ret != Z_OK) {
# 1168|   			error("decompression failed with %d", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
btrfs-progs-v6.17.1/image/image-restore.c:1168:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1129:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1144:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1145:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1150:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1151:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1157:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1157:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1158:24: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1162:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1166:71: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1167:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1168:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1168:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1168:25: danger: ‘buffer’ leaks here; was allocated at [(13)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/12)
# 1166|   		ret = uncompress(tmp, (unsigned long *)&size, buffer, get_unaligned_le32(&item->size));
# 1167|   		if (ret != Z_OK) {
# 1168|-> 			error("decompression failed with %d", ret);
# 1169|   			free(buffer);
# 1170|   			free(tmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def488]
btrfs-progs-v6.17.1/image/image-restore.c:1179:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:1109:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1112:15: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1113:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1121:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1120:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1126:34: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1128:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1129:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1139:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1144:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1145:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1150:65: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1151:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1157:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1157:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1177:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1179:15: throw: if ‘btrfs_check_super’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1179:15: danger: ‘buffer’ leaks here; was allocated at [(13)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/12)
# 1177|   	pthread_mutex_lock(&mdres->mutex);
# 1178|   	super = (struct btrfs_super_block *)buffer;
# 1179|-> 	ret = btrfs_check_super(super, 0);
# 1180|   	if (ret < 0) {
# 1181|   		error("invalid superblock");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def489]
btrfs-progs-v6.17.1/image/image-restore.c:1264:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1314:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
# 1262|   		if (!buffer)
# 1263|   			return -ENOMEM;
# 1264|-> 		ret = uncompress(buffer, (unsigned long *)&size,
# 1265|   				 async->buffer, async->bufsize);
# 1266|   		if (ret != Z_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def490]
btrfs-progs-v6.17.1/image/image-restore.c:1264:23: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
# 1262|   		if (!buffer)
# 1263|   			return -ENOMEM;
# 1264|-> 		ret = uncompress(buffer, (unsigned long *)&size,
# 1265|   				 async->buffer, async->bufsize);
# 1266|   		if (ret != Z_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
btrfs-progs-v6.17.1/image/image-restore.c:1264:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/image/image-restore.c:1250:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1253:13: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1253:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1259:24: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1261:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1262:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1265:49: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1264:23: throw: if ‘uncompress’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1264:23: danger: ‘buffer’ leaks here; was allocated at [(5)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/4)
# 1262|   		if (!buffer)
# 1263|   			return -ENOMEM;
# 1264|-> 		ret = uncompress(buffer, (unsigned long *)&size,
# 1265|   				 async->buffer, async->bufsize);
# 1266|   		if (ret != Z_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
btrfs-progs-v6.17.1/image/image-restore.c:1267:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1314:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
# 1265|   				 async->buffer, async->bufsize);
# 1266|   		if (ret != Z_OK) {
# 1267|-> 			error("decompression failed with %d", ret);
# 1268|   			free(buffer);
# 1269|   			return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
btrfs-progs-v6.17.1/image/image-restore.c:1267:25: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
# 1265|   				 async->buffer, async->bufsize);
# 1266|   		if (ret != Z_OK) {
# 1267|-> 			error("decompression failed with %d", ret);
# 1268|   			free(buffer);
# 1269|   			return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
btrfs-progs-v6.17.1/image/image-restore.c:1316:25: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1316:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1316:25: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1316:25: danger: ‘async’ leaks here; was allocated at [(3)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/2)
# 1314|   		async->buffer = malloc(async->bufsize);
# 1315|   		if (!async->buffer) {
# 1316|-> 			error_mem("async buffer");
# 1317|   			free(async);
# 1318|   			return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1314:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/4)
# 1320|   		ret = fread(async->buffer, async->bufsize, 1, mdres->in);
# 1321|   		if (ret != 1) {
# 1322|-> 			error("unable to read buffer: %m");
# 1323|   			free(async->buffer);
# 1324|   			free(async);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def496]
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_true: following ‘true’ branch (when ‘ret != 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1322:25: danger: ‘async’ leaks here; was allocated at [(3)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/2)
# 1320|   		ret = fread(async->buffer, async->bufsize, 1, mdres->in);
# 1321|   		if (ret != 1) {
# 1322|-> 			error("unable to read buffer: %m");
# 1323|   			free(async->buffer);
# 1324|   			free(async);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def497]
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1314:33: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: return_function: returning to ‘add_cluster’ from ‘fill_mdres_info’
btrfs-progs-v6.17.1/image/image-restore.c:1332:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/5)
# 1331|   			ret = fill_mdres_info(mdres, async);
# 1332|   			if (ret) {
# 1333|-> 				error("unable to set up restore state");
# 1334|   				pthread_mutex_unlock(&mdres->mutex);
# 1335|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: warning[-Wanalyzer-malloc-leak]: leak of ‘async’
btrfs-progs-v6.17.1/image/image-restore.c:1289:12: enter_function: entry to ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1305:21: branch_true: following ‘true’ branch (when ‘i < nritems’)...
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1307:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1308:20: branch_false: following ‘false’ branch (when ‘async’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1312:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1315:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1320:63: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1321:20: branch_false: following ‘false’ branch (when ‘ret == 1’)...
btrfs-progs-v6.17.1/image/image-restore.c:1327:27: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1330:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: call_function: calling ‘fill_mdres_info’ from ‘add_cluster’
btrfs-progs-v6.17.1/image/image-restore.c:1331:31: return_function: returning to ‘add_cluster’ from ‘fill_mdres_info’
btrfs-progs-v6.17.1/image/image-restore.c:1332:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1333:33: danger: ‘async’ leaks here; was allocated at [(4)](sarif:/runs/0/results/82/codeFlows/0/threadFlows/0/locations/3)
# 1331|   			ret = fill_mdres_info(mdres, async);
# 1332|   			if (ret) {
# 1333|-> 				error("unable to set up restore state");
# 1334|   				pthread_mutex_unlock(&mdres->mutex);
# 1335|   				free(async->buffer);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def499]
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_resource: opened here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: throw: if ‘open_ctree_fs_info’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/83/codeFlows/0/threadFlows/0/locations/2)
# 1793|   			    OPEN_CTREE_PARTIAL | OPEN_CTREE_SKIP_LEAF_ITEM_CHECKS |
# 1794|   			    OPEN_CTREE_EXCLUSIVE;
# 1795|-> 		info = open_ctree_fs_info(&oca);
# 1796|   		if (!info) {
# 1797|   			error("open ctree failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: throw: if ‘open_ctree_fs_info’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1795:24: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/2)
# 1793|   			    OPEN_CTREE_PARTIAL | OPEN_CTREE_SKIP_LEAF_ITEM_CHECKS |
# 1794|   			    OPEN_CTREE_EXCLUSIVE;
# 1795|-> 		info = open_ctree_fs_info(&oca);
# 1796|   		if (!info) {
# 1797|   			error("open ctree failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def501]
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_resource: opened here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1796:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/2)
# 1795|   		info = open_ctree_fs_info(&oca);
# 1796|   		if (!info) {
# 1797|-> 			error("open ctree failed");
# 1798|   			ret = -EIO;
# 1799|   			goto failed_open;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1796:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1797:25: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/2)
# 1795|   		info = open_ctree_fs_info(&oca);
# 1796|   		if (!info) {
# 1797|-> 			error("open ctree failed");
# 1798|   			ret = -EIO;
# 1799|   			goto failed_open;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def503]
btrfs-progs-v6.17.1/image/image-restore.c:1799:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_resource: opened here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1930:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1783:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1799:25: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/2)
# 1797|   			error("open ctree failed");
# 1798|   			ret = -EIO;
# 1799|-> 			goto failed_open;
# 1800|   		}
# 1801|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
btrfs-progs-v6.17.1/image/image-restore.c:1799:25: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1930:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1783:32: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1799:25: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/2)
# 1797|   			error("open ctree failed");
# 1798|   			ret = -EIO;
# 1799|-> 			goto failed_open;
# 1800|   		}
# 1801|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def505]
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_resource: opened here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_true: following ‘true’ branch (when ‘cluster’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: danger: ‘in’ leaks here; was opened at [(3)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/2)
# 1803|   	cluster = malloc(IMAGE_BLOCK_SIZE);
# 1804|   	if (!cluster) {
# 1805|-> 		error_mem(NULL);
# 1806|   		ret = -ENOMEM;
# 1807|   		goto failed_info;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: following ‘false’ branch (when ‘fixup_offset == 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1803:19: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_true: following ‘true’ branch (when ‘cluster’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: danger: ‘in’ leaks here; was allocated at [(3)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/2)
# 1803|   	cluster = malloc(IMAGE_BLOCK_SIZE);
# 1804|   	if (!cluster) {
# 1805|-> 		error_mem(NULL);
# 1806|   		ret = -ENOMEM;
# 1807|   		goto failed_info;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def507]
btrfs-progs-v6.17.1/image/sanitize.c:122:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  120|   	}
#  121|   	for (i = 0; i < 4; i++)
#  122|-> 		suffix[i] = (desired_crc >> i * 8) & 0xFF;
#  123|   }
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def508]
btrfs-progs-v6.17.1/image/sanitize.c:134:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  132|   
#  133|   	for (i = 0; i < 4; i++) {
#  134|-> 		c = suffix[i];
#  135|   		if (c < ' ' || c > 126 || c == '/')
#  136|   			return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
btrfs-progs-v6.17.1/image/sanitize.c:151:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:275:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  149|   	if (name_len <= 4)
#  150|   		return 0;
#  151|-> 	checksum = crc32c(~1, val->val, name_len);
#  152|   	name_len -= 4;
#  153|   	memset(val->sub, ' ', name_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def510]
btrfs-progs-v6.17.1/image/sanitize.c:151:20: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:264:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  149|   	if (name_len <= 4)
#  150|   		return 0;
#  151|-> 	checksum = crc32c(~1, val->val, name_len);
#  152|   	name_len -= 4;
#  153|   	memset(val->sub, ' ', name_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def511]
btrfs-progs-v6.17.1/image/sanitize.c:156:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:275:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  154|   	i = 0;
#  155|   	while (1) {
#  156|-> 		current_checksum = crc32c(~1, val->sub, name_len);
#  157|   		find_collision_calc_suffix(current_checksum,
#  158|   					   checksum,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def512]
btrfs-progs-v6.17.1/image/sanitize.c:156:36: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:246:14: enter_function: entry to ‘find_collision’
btrfs-progs-v6.17.1/image/sanitize.c:264:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:283:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:283:17: call_function: calling ‘find_collision_reverse_crc32c’ from ‘find_collision’
#  154|   	i = 0;
#  155|   	while (1) {
#  156|-> 		current_checksum = crc32c(~1, val->sub, name_len);
#  157|   		find_collision_calc_suffix(current_checksum,
#  158|   					   checksum,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def513]
btrfs-progs-v6.17.1/image/sanitize.c:211:9: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  209|   
#  210|   	rb_link_node(ins, parent, p);
#  211|-> 	rb_insert_color(ins, root);
#  212|   }
#  213|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
btrfs-progs-v6.17.1/image/sanitize.c:277:17: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:264:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/sanitize.c:265:12: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
btrfs-progs-v6.17.1/image/sanitize.c:271:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:276:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:277:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:277:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/image/sanitize.c:277:17: danger: ‘val’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  275|   	val->sub = malloc(name_len);
#  276|   	if (!val->sub) {
#  277|-> 		error_mem("sanitize name");
#  278|   		free(val);
#  279|   		free(name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def515]
btrfs-progs-v6.17.1/image/sanitize.c:286:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  284|   
#  285|   	if (!found) {
#  286|-> 		warning(
#  287|   "cannot find a hash collision for '%.*s', generating garbage, it won't match indexes",
#  288|   			val->len, val->val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
btrfs-progs-v6.17.1/image/sanitize.c:286:17: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  284|   
#  285|   	if (!found) {
#  286|-> 		warning(
#  287|   "cannot find a hash collision for '%.*s', generating garbage, it won't match indexes",
#  288|   			val->len, val->val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def517]
btrfs-progs-v6.17.1/image/sanitize.c:290:34: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  288|   			val->len, val->val);
#  289|   		for (i = 0; i < name_len; i++) {
#  290|-> 			char c = rand_range(94) + 33;
#  291|   
#  292|   			if (c == '/')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def518]
btrfs-progs-v6.17.1/image/sanitize.c:290:34: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  288|   			val->len, val->val);
#  289|   		for (i = 0; i < name_len; i++) {
#  290|-> 			char c = rand_range(94) + 33;
#  291|   
#  292|   			if (c == '/')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def519]
btrfs-progs-v6.17.1/image/sanitize.c:311:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  309|   
#  310|   	for (i = 0; i < name_len; i++) {
#  311|-> 		char c = rand_range(94) + 33;
#  312|   
#  313|   		if (c == '/')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def520]
btrfs-progs-v6.17.1/image/sanitize.c:349:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  347|   				return;
#  348|   			}
#  349|-> 			read_extent_buffer(eb, buf, name_ptr, name_len);
#  350|   			garbage = find_collision(name_tree, buf, name_len);
#  351|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def521]
btrfs-progs-v6.17.1/image/sanitize.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of ‘garbage’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  356|   			return;
#  357|   		}
#  358|-> 		write_extent_buffer(eb, garbage, name_ptr, name_len);
#  359|   		cur += this_len;
#  360|   		dir_item = (struct btrfs_dir_item *)((char *)dir_item +

Error: GCC_ANALYZER_WARNING (CWE-401): [#def522]
btrfs-progs-v6.17.1/image/sanitize.c:365:1: warning[-Wanalyzer-malloc-leak]: leak of ‘garbage’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  363|   			free(garbage);
#  364|   	}
#  365|-> }
#  366|   
#  367|   static void sanitize_inode_ref(enum sanitize_mode sanitize,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
btrfs-progs-v6.17.1/image/sanitize.c:404:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:469:17: call_function: calling ‘sanitize_inode_ref’ from ‘sanitize_name’
#  402|   				return;
#  403|   			}
#  404|-> 			read_extent_buffer(eb, buf, name_ptr, len);
#  405|   			garbage = find_collision(name_tree, buf, len);
#  406|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def524]
btrfs-progs-v6.17.1/image/sanitize.c:438:14: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_dummy_eb(*src.start, *src.len)’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  436|   	struct extent_buffer *eb;
#  437|   
#  438|-> 	eb = calloc(1, sizeof(struct extent_buffer) + size);
#  439|   	if (!eb)
#  440|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def525]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-utils.c:109:5: enter_function: entry to ‘device_zero_blocks’
btrfs-progs-v6.17.1/common/device-utils.c:111:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-utils.c:115:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-utils.c:117:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-utils.c:118:19: call_function: calling ‘btrfs_pwrite’ from ‘device_zero_blocks’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1682:31: call_function: calling ‘btrfs_list_parse_sort_string’ from ‘cmd_subvolume_list’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1580:12: enter_function: entry to ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: call_function: calling ‘btrfs_list_alloc_filter_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1593:22: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_filter_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: call_function: calling ‘btrfs_list_alloc_comparer_set’ from ‘cmd_subvolume_list’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1598:24: return_function: returning to ‘cmd_subvolume_list’ from ‘btrfs_list_alloc_comparer_set’
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1614:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1617:17: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/subvolume-list.c:1682:31: call_function: calling ‘btrfs_list_parse_sort_string’ from ‘cmd_subvolume_list’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘head_ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:617:5: enter_function: entry to ‘btrfs_add_delayed_tree_ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:633:12: branch_false: following ‘false’ branch (when ‘ref’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:636:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:646:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:647:12: branch_false: following ‘false’ branch (when ‘head_ref’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: call_function: calling ‘init_delayed_ref_head’ from ‘btrfs_add_delayed_tree_ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: return_function: returning to ‘btrfs_add_delayed_tree_ref’ from ‘init_delayed_ref_head’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:656:20: call_function: calling ‘add_delayed_ref_head’ from ‘btrfs_add_delayed_tree_ref’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘multi’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2093:5: enter_function: entry to ‘__btrfs_map_block’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2117:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2122:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2122:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2128:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2128:12: branch_true: following ‘true’ branch (when ‘multi_ret’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2129:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2129:25: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2131:20: branch_false: following ‘false’ branch (when ‘multi’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2135:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2162:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2173:33: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2176:9: call_function: inlined call to ‘bugon_trace’ from ‘__btrfs_map_block’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘opt_tmp’
btrfs-progs-v6.17.1/cmds/qgroup.c:1670:12: enter_function: entry to ‘qgroup_parse_sort_string’
btrfs-progs-v6.17.1/cmds/qgroup.c:1681:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/cmds/qgroup.c:1682:12: branch_false: following ‘false’ branch (when ‘opt_tmp’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1685:13: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1686:16: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1686:16: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1690:24: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:1691:29: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1691:28: branch_true: following ‘true’ branch (when the strings are equal)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1706:20: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1706:20: branch_true: following ‘true’ branch (when ‘flag != 0’)...
btrfs-progs-v6.17.1/cmds/qgroup.c:1710:29: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1710:28: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:1712:33: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1719:40: call_function: calling ‘qgroup_get_sort_item’ from ‘qgroup_parse_sort_string’
btrfs-progs-v6.17.1/cmds/qgroup.c:1719:40: return_function: returning to ‘qgroup_parse_sort_string’ from ‘qgroup_get_sort_item’
btrfs-progs-v6.17.1/cmds/qgroup.c:1720:28: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/qgroup.c:1724:32: branch_false: ...to here
btrfs-progs-v6.17.1/cmds/qgroup.c:1724:32: call_function: calling ‘qgroup_setup_comparer’ from ‘qgroup_parse_sort_string’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘prealloc’
btrfs-progs-v6.17.1/kernel-shared/extent-io-tree.c:1730:5: enter_function: entry to ‘try_lock_extent’
btrfs-progs-v6.17.1/kernel-shared/extent-io-tree.c:1736:15: call_function: calling ‘__set_extent_bit’ from ‘try_lock_extent’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘raid_map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2093:5: enter_function: entry to ‘__btrfs_map_block’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2117:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2122:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2122:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2128:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2128:12: branch_true: following ‘true’ branch (when ‘multi_ret’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2129:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2131:20: branch_false: following ‘false’ branch (when ‘multi’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2135:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2145:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2145:13: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2145:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2152:20: branch_true: following ‘true’ branch (when ‘stripes_allocated >= stripes_required’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2153:36: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2153:36: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2154:28: branch_false: following ‘false’ branch (when ‘raid_map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2162:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2162:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2173:33: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2176:9: call_function: inlined call to ‘bugon_trace’ from ‘__btrfs_map_block’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:617:5: enter_function: entry to ‘btrfs_add_delayed_tree_ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:632:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:633:12: branch_false: following ‘false’ branch (when ‘ref’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:636:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:647:12: branch_false: following ‘false’ branch (when ‘head_ref’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: call_function: calling ‘init_delayed_ref_head’ from ‘btrfs_add_delayed_tree_ref’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:650:9: return_function: returning to ‘btrfs_add_delayed_tree_ref’ from ‘init_delayed_ref_head’
btrfs-progs-v6.17.1/kernel-shared/delayed-ref.c:656:20: call_function: calling ‘add_delayed_ref_head’ from ‘btrfs_add_delayed_tree_ref’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def538]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘val’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-404): [#def540]
btrfs-progs-v6.17.1/include/kerncompat.h:147:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/common/format-output.c:301:6: enter_function: entry to ‘fmt_print’
btrfs-progs-v6.17.1/common/format-output.c:307:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/common/format-output.c:317:12: branch_false: following ‘false’ branch (when ‘found == 0’)...
btrfs-progs-v6.17.1/common/format-output.c:318:17: branch_false: ...to here
btrfs-progs-v6.17.1/common/format-output.c:318:17: call_function: calling ‘print_trace’ from ‘fmt_print’
#  145|   	int size;
#  146|   
#  147|-> 	size = backtrace(array, MAX_BACKTRACE);
#  148|   	backtrace_symbols_fd(array, size, 2);
#  149|   #endif

Error: GCC_ANALYZER_WARNING (CWE-416): [#def541]
btrfs-progs-v6.17.1/kernel-lib/list.h:182:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘((const struct list_head *)((char *)recover + 8))[1].next’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:224:5: enter_function: entry to ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:232:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:236:9: call_function: inlined call to ‘init_recover_superblock’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:241:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:243:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: call_function: calling ‘recover_err_str’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: return_function: returning to ‘btrfs_recover_superblocks’ from ‘recover_err_str’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:289:9: call_function: calling ‘free_recover_superblock’ from ‘btrfs_recover_superblocks’
#  180|   		return;
#  181|   
#  182|-> 	__list_del(entry->prev, entry->next);
#  183|   }
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-416): [#def542]
btrfs-progs-v6.17.1/kernel-lib/list.h:182:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*(const struct list_head *)((char *)recover + 8).next’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:224:5: enter_function: entry to ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:232:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:236:9: call_function: inlined call to ‘init_recover_superblock’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:241:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:243:17: branch_true: ...to here
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: call_function: calling ‘recover_err_str’ from ‘btrfs_recover_superblocks’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:288:9: return_function: returning to ‘btrfs_recover_superblocks’ from ‘recover_err_str’
btrfs-progs-v6.17.1/cmds/rescue-super-recover.c:289:9: call_function: calling ‘free_recover_superblock’ from ‘btrfs_recover_superblocks’
#  180|   		return;
#  181|   
#  182|-> 	__list_del(entry->prev, entry->next);
#  183|   }
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-416): [#def543]
btrfs-progs-v6.17.1/kernel-lib/list.h:182:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘corrupted_blocks.next’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:451:13: enter_function: entry to ‘free_corrupted_blocks’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:453:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:457:17: call_function: inlined call to ‘list_del_init’ from ‘free_corrupted_blocks’
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:459:17: release_memory: freed here
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:453:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/cmds/rescue-fix-data-checksum.c:457:17: call_function: inlined call to ‘list_del_init’ from ‘free_corrupted_blocks’
#  180|   		return;
#  181|   
#  182|-> 	__list_del(entry->prev, entry->next);
#  183|   }
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def544]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:164:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_chunk’
btrfs-progs-v6.17.1/image/image-restore.c:781:12: enter_function: entry to ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:786:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:792:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:796:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:797:20: branch_false: following ‘false’ branch (when ‘fs_chunk’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:801:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:806:35: call_function: inlined call to ‘btrfs_chunk_length’ from ‘read_chunk_tree_block’
#  162|   }
#  163|   
#  164|-> BTRFS_SETGET_FUNCS(chunk_length, struct btrfs_chunk, length, 64);
#  165|   BTRFS_SETGET_FUNCS(chunk_owner, struct btrfs_chunk, owner, 64);
#  166|   BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def545]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:166:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2445:27: call_function: inlined call to ‘btrfs_chunk_stripe_len’ from ‘read_one_chunk’
#  164|   BTRFS_SETGET_FUNCS(chunk_length, struct btrfs_chunk, length, 64);
#  165|   BTRFS_SETGET_FUNCS(chunk_owner, struct btrfs_chunk, owner, 64);
#  166|-> BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64);
#  167|   BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32);
#  168|   BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def546]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:167:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2443:25: call_function: inlined call to ‘btrfs_chunk_io_align’ from ‘read_one_chunk’
#  165|   BTRFS_SETGET_FUNCS(chunk_owner, struct btrfs_chunk, owner, 64);
#  166|   BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64);
#  167|-> BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32);
#  168|   BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);
#  169|   BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:168:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2442:25: call_function: inlined call to ‘btrfs_chunk_io_width’ from ‘read_one_chunk’
#  166|   BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64);
#  167|   BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32);
#  168|-> BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);
#  169|   BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32);
#  170|   BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:169:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2444:28: call_function: inlined call to ‘btrfs_chunk_sector_size’ from ‘read_one_chunk’
#  167|   BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32);
#  168|   BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);
#  169|-> BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32);
#  170|   BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64);
#  171|   BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:170:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2446:21: call_function: inlined call to ‘btrfs_chunk_type’ from ‘read_one_chunk’
#  168|   BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32);
#  169|   BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32);
#  170|-> BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64);
#  171|   BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);
#  172|   BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:172:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2447:28: call_function: inlined call to ‘btrfs_chunk_sub_stripes’ from ‘read_one_chunk’
#  170|   BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64);
#  171|   BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);
#  172|-> BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);
#  173|   BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64);
#  174|   BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:173:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2449:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2451:25: call_function: inlined call to ‘btrfs_stripe_offset_nr’ from ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2452:25: call_function: inlined call to ‘btrfs_stripe_devid_nr’ from ‘read_one_chunk’
#  171|   BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16);
#  172|   BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);
#  173|-> BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64);
#  174|   BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64);
#  175|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:174:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_chunk’
btrfs-progs-v6.17.1/image/image-restore.c:781:12: enter_function: entry to ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:786:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:792:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:796:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:797:20: branch_false: following ‘false’ branch (when ‘fs_chunk’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:801:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:805:38: call_function: inlined call to ‘btrfs_stripe_offset_nr’ from ‘read_chunk_tree_block’
#  172|   BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);
#  173|   BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64);
#  174|-> BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64);
#  175|   
#  176|   static inline char *btrfs_stripe_dev_uuid(struct btrfs_stripe *s)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def553]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:174:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2449:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2451:25: call_function: inlined call to ‘btrfs_stripe_offset_nr’ from ‘read_one_chunk’
#  172|   BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16);
#  173|   BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64);
#  174|-> BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64);
#  175|   
#  176|   static inline char *btrfs_stripe_dev_uuid(struct btrfs_stripe *s)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:272:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1803:23: call_function: inlined call to ‘btrfs_inode_size’ from ‘do_rollback’
#  270|   BTRFS_SETGET_FUNCS(inode_sequence, struct btrfs_inode_item, sequence, 64);
#  271|   BTRFS_SETGET_FUNCS(inode_transid, struct btrfs_inode_item, transid, 64);
#  272|-> BTRFS_SETGET_FUNCS(inode_size, struct btrfs_inode_item, size, 64);
#  273|   BTRFS_SETGET_FUNCS(inode_nbytes, struct btrfs_inode_item, nbytes, 64);
#  274|   BTRFS_SETGET_FUNCS(inode_block_group, struct btrfs_inode_item, block_group, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:272:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1803:23: call_function: inlined call to ‘btrfs_inode_size’ from ‘do_rollback’
#  270|   BTRFS_SETGET_FUNCS(inode_sequence, struct btrfs_inode_item, sequence, 64);
#  271|   BTRFS_SETGET_FUNCS(inode_transid, struct btrfs_inode_item, transid, 64);
#  272|-> BTRFS_SETGET_FUNCS(inode_size, struct btrfs_inode_item, size, 64);
#  273|   BTRFS_SETGET_FUNCS(inode_nbytes, struct btrfs_inode_item, nbytes, 64);
#  274|   BTRFS_SETGET_FUNCS(inode_block_group, struct btrfs_inode_item, block_group, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:272:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1803:23: call_function: inlined call to ‘btrfs_inode_size’ from ‘do_rollback’
#  270|   BTRFS_SETGET_FUNCS(inode_sequence, struct btrfs_inode_item, sequence, 64);
#  271|   BTRFS_SETGET_FUNCS(inode_transid, struct btrfs_inode_item, transid, 64);
#  272|-> BTRFS_SETGET_FUNCS(inode_size, struct btrfs_inode_item, size, 64);
#  273|   BTRFS_SETGET_FUNCS(inode_nbytes, struct btrfs_inode_item, nbytes, 64);
#  274|   BTRFS_SETGET_FUNCS(inode_block_group, struct btrfs_inode_item, block_group, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:280:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1273:30: branch_true: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1276:29: call_function: inlined call to ‘btrfs_inode_flags’ from ‘fill_csum_tree_from_one_fs_root’
#  278|   BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32);
#  279|   BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64);
#  280|-> BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64);
#  281|   BTRFS_SETGET_STACK_FUNCS(stack_inode_generation, struct btrfs_inode_item,
#  282|   			 generation, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:333:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  331|   
#  332|   /* struct btrfs_dev_extent */
#  333|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64);
#  334|   BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:333:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  331|   
#  332|   /* struct btrfs_dev_extent */
#  333|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64);
#  334|   BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:334:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  332|   /* struct btrfs_dev_extent */
#  333|   BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64);
#  334|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);
#  336|   BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:334:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  332|   /* struct btrfs_dev_extent */
#  333|   BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64);
#  334|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);
#  336|   BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:336:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  334|   BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);
#  336|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,
#  337|   		   chunk_offset, 64);
#  338|   BTRFS_SETGET_FUNCS(dev_extent_length, struct btrfs_dev_extent, length, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def563]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:336:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  334|   BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent,
#  335|   		   chunk_objectid, 64);
#  336|-> BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,
#  337|   		   chunk_offset, 64);
#  338|   BTRFS_SETGET_FUNCS(dev_extent_length, struct btrfs_dev_extent, length, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:338:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  336|   BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,
#  337|   		   chunk_offset, 64);
#  338|-> BTRFS_SETGET_FUNCS(dev_extent_length, struct btrfs_dev_extent, length, 64);
#  339|   BTRFS_SETGET_STACK_FUNCS(stack_dev_extent_chunk_tree, struct btrfs_dev_extent,
#  340|   			 chunk_tree, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:338:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  336|   BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent,
#  337|   		   chunk_offset, 64);
#  338|-> BTRFS_SETGET_FUNCS(dev_extent_length, struct btrfs_dev_extent, length, 64);
#  339|   BTRFS_SETGET_STACK_FUNCS(stack_dev_extent_chunk_tree, struct btrfs_dev_extent,
#  340|   			 chunk_tree, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def566]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:349:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1529:23: call_function: inlined call to ‘btrfs_extent_flags’ from ‘fill_csum_tree_from_extent’
#  347|   BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_extent_item, refs, 64);
#  348|   BTRFS_SETGET_FUNCS(extent_generation, struct btrfs_extent_item, generation, 64);
#  349|-> BTRFS_SETGET_FUNCS(extent_flags, struct btrfs_extent_item, flags, 64);
#  350|   
#  351|   BTRFS_SETGET_FUNCS(tree_block_level, struct btrfs_tree_block_info, level, 8);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def567]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:364:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘info’
btrfs-progs-v6.17.1/convert/common.c:563:12: enter_function: entry to ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:607:12: branch_true: following ‘true’ branch (when ‘skinny_metadata != 0’)...
btrfs-progs-v6.17.1/convert/common.c:608:17: branch_true: ...to here
btrfs-progs-v6.17.1/convert/common.c:617:12: branch_false: following ‘false’ branch (when ‘skinny_metadata == 0’)...
btrfs-progs-v6.17.1/convert/common.c:625:37: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:626:12: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
btrfs-progs-v6.17.1/convert/common.c:628:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:628:15: call_function: calling ‘setup_temp_extent_buffer’ from ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:628:15: return_function: returning to ‘insert_temp_extent_item’ from ‘setup_temp_extent_buffer’
btrfs-progs-v6.17.1/convert/common.c:629:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:631:15: branch_false: ...to here
btrfs-progs-v6.17.1/convert/common.c:632:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:636:13: call_function: inlined call to ‘btrfs_header_nritems’ from ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:636:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/common.c:641:17: call_function: inlined call to ‘btrfs_item_key’ from ‘insert_temp_extent_item’
btrfs-progs-v6.17.1/convert/common.c:643:9: call_function: inlined call to ‘btrfs_set_tree_block_key’ from ‘insert_temp_extent_item’
#  362|   					    const struct btrfs_disk_key *key)
#  363|   {
#  364|-> 	write_eb_member(eb, item, struct btrfs_tree_block_info, key, key);
#  365|   }
#  366|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_cursor’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap’
btrfs-progs-v6.17.1/mkfs/main.c:1295:12: enter_function: entry to ‘discard_free_space’
btrfs-progs-v6.17.1/mkfs/main.c:1307:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1317:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1317:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1320:27: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1327:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1327:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1353:34: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1354:28: branch_false: following ‘false’ branch (when ‘bitmap’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1360:44: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1360:44: call_function: inlined call to ‘btrfs_item_offset’ from ‘discard_free_space’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1527:22: call_function: inlined call to ‘btrfs_item_offset’ from ‘fill_csum_tree_from_extent’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘cache’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2716:12: enter_function: entry to ‘read_one_block_group’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2733:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2737:12: branch_false: following ‘false’ branch (when ‘cache’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2739:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2739:15: call_function: calling ‘read_block_group_item’ from ‘read_one_block_group’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def573]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_chunk’
btrfs-progs-v6.17.1/image/image-restore.c:781:12: enter_function: entry to ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:786:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:792:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘read_chunk_tree_block’
btrfs-progs-v6.17.1/image/image-restore.c:796:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:797:20: branch_false: following ‘false’ branch (when ‘fs_chunk’ is non-NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:801:17: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:802:25: call_function: inlined call to ‘btrfs_item_offset’ from ‘read_chunk_tree_block’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def574]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1749:25: call_function: inlined call to ‘btrfs_item_offset’ from ‘do_rollback’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1749:25: call_function: inlined call to ‘btrfs_item_offset’ from ‘do_rollback’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1749:25: call_function: inlined call to ‘btrfs_item_offset’ from ‘do_rollback’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def579]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:465:1: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1023:12: enter_function: entry to ‘load_global_roots_objectid’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1046:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1054:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1056:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1059:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1059:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1066:24: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1066:24: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1067:20: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1072:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1074:36: call_function: inlined call to ‘btrfs_item_offset’ from ‘load_global_roots_objectid’
#  463|   
#  464|   /* struct btrfs_item */
#  465|-> BTRFS_SETGET_FUNCS(raw_item_offset, struct btrfs_item, offset, 32);
#  466|   BTRFS_SETGET_FUNCS(raw_item_size, struct btrfs_item, size, 32);
#  467|   BTRFS_SETGET_STACK_FUNCS(stack_item_offset, struct btrfs_item, offset, 32);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def580]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1510:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1519:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1521:17: call_function: inlined call to ‘btrfs_item_key_to_cpu’ from ‘fill_csum_tree_from_extent’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def581]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def584]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:505:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  503|   	struct btrfs_item *item = btrfs_item_nr(eb, nr);
#  504|   
#  505|-> 	read_eb_member(eb, item, struct btrfs_item, key, disk_key);
#  506|   }
#  507|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def586]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:521:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1750:20: call_function: inlined call to ‘btrfs_root_ref_name_len’ from ‘do_rollback’
#  519|   BTRFS_SETGET_FUNCS(root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  520|   BTRFS_SETGET_FUNCS(root_ref_sequence, struct btrfs_root_ref, sequence, 64);
#  521|-> BTRFS_SETGET_FUNCS(root_ref_name_len, struct btrfs_root_ref, name_len, 16);
#  522|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  523|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_sequence, struct btrfs_root_ref, sequence, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:521:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1750:20: call_function: inlined call to ‘btrfs_root_ref_name_len’ from ‘do_rollback’
#  519|   BTRFS_SETGET_FUNCS(root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  520|   BTRFS_SETGET_FUNCS(root_ref_sequence, struct btrfs_root_ref, sequence, 64);
#  521|-> BTRFS_SETGET_FUNCS(root_ref_name_len, struct btrfs_root_ref, name_len, 16);
#  522|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  523|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_sequence, struct btrfs_root_ref, sequence, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def588]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:521:1: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1750:20: call_function: inlined call to ‘btrfs_root_ref_name_len’ from ‘do_rollback’
#  519|   BTRFS_SETGET_FUNCS(root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  520|   BTRFS_SETGET_FUNCS(root_ref_sequence, struct btrfs_root_ref, sequence, 64);
#  521|-> BTRFS_SETGET_FUNCS(root_ref_name_len, struct btrfs_root_ref, name_len, 16);
#  522|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_dirid, struct btrfs_root_ref, dirid, 64);
#  523|   BTRFS_SETGET_STACK_FUNCS(stack_root_ref_sequence, struct btrfs_root_ref, sequence, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:527:1: warning[-Wanalyzer-malloc-leak]: leak of ‘garbage’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  525|   
#  526|   /* struct btrfs_dir_item */
#  527|-> BTRFS_SETGET_FUNCS(dir_data_len, struct btrfs_dir_item, data_len, 16);
#  528|   BTRFS_SETGET_FUNCS(dir_flags, struct btrfs_dir_item, type, 8);
#  529|   BTRFS_SETGET_FUNCS(dir_name_len, struct btrfs_dir_item, name_len, 16);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def590]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:529:1: warning[-Wanalyzer-malloc-leak]: leak of ‘garbage’
btrfs-progs-v6.17.1/image/sanitize.c:447:6: enter_function: entry to ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: call_function: calling ‘alloc_dummy_eb’ from ‘sanitize_name’
btrfs-progs-v6.17.1/image/sanitize.c:455:14: return_function: returning to ‘sanitize_name’ from ‘alloc_dummy_eb’
btrfs-progs-v6.17.1/image/sanitize.c:456:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/sanitize.c:461:9: branch_false: ...to here
btrfs-progs-v6.17.1/image/sanitize.c:466:17: call_function: calling ‘sanitize_dir_item’ from ‘sanitize_name’
#  527|   BTRFS_SETGET_FUNCS(dir_data_len, struct btrfs_dir_item, data_len, 16);
#  528|   BTRFS_SETGET_FUNCS(dir_flags, struct btrfs_dir_item, type, 8);
#  529|-> BTRFS_SETGET_FUNCS(dir_name_len, struct btrfs_dir_item, name_len, 16);
#  530|   BTRFS_SETGET_FUNCS(dir_transid, struct btrfs_dir_item, transid, 64);
#  531|   BTRFS_SETGET_STACK_FUNCS(stack_dir_flags, struct btrfs_dir_item, type, 8);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:551:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1787:9: call_function: inlined call to ‘btrfs_dir_item_key_to_cpu’ from ‘do_rollback’
#  549|   				      struct btrfs_disk_key *key)
#  550|   {
#  551|-> 	read_eb_member(eb, item, struct btrfs_dir_item, location, key);
#  552|   }
#  553|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:551:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1787:9: call_function: inlined call to ‘btrfs_dir_item_key_to_cpu’ from ‘do_rollback’
#  549|   				      struct btrfs_disk_key *key)
#  550|   {
#  551|-> 	read_eb_member(eb, item, struct btrfs_dir_item, location, key);
#  552|   }
#  553|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:551:9: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1787:9: call_function: inlined call to ‘btrfs_dir_item_key_to_cpu’ from ‘do_rollback’
#  549|   				      struct btrfs_disk_key *key)
#  550|   {
#  551|-> 	read_eb_member(eb, item, struct btrfs_dir_item, location, key);
#  552|   }
#  553|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def594]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:683:1: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leaf’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2050:12: enter_function: entry to ‘push_leaf_left’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2070:12: branch_false: following ‘false’ branch (when ‘slot != 0’)...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2072:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2072:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2075:25: call_function: inlined call to ‘btrfs_header_nritems’ from ‘push_leaf_left’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2076:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2080:16: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2080:9: release_memory: ‘left’ is NULL
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2081:22: call_function: calling ‘btrfs_leaf_free_space’ from ‘push_leaf_left’
#  681|   BTRFS_SETGET_HEADER_FUNCS(header_generation, struct btrfs_header, generation, 64);
#  682|   BTRFS_SETGET_HEADER_FUNCS(header_owner, struct btrfs_header, owner, 64);
#  683|-> BTRFS_SETGET_HEADER_FUNCS(header_nritems, struct btrfs_header, nritems, 32);
#  684|   BTRFS_SETGET_HEADER_FUNCS(header_flags, struct btrfs_header, flags, 64);
#  685|   BTRFS_SETGET_HEADER_FUNCS(header_level, struct btrfs_header, level, 8);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def595]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:956:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1283:24: call_function: inlined call to ‘btrfs_file_extent_type’ from ‘fill_csum_tree_from_one_fs_root’
#  954|   			 struct btrfs_file_extent_item, compression, 8);
#  955|   
#  956|-> BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8);
#  957|   BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item,
#  958|   		   disk_bytenr, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def596]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:956:1: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  954|   			 struct btrfs_file_extent_item, compression, 8);
#  955|   
#  956|-> BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8);
#  957|   BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item,
#  958|   		   disk_bytenr, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def597]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:957:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
#  955|   
#  956|   BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8);
#  957|-> BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item,
#  958|   		   disk_bytenr, 64);
#  959|   BTRFS_SETGET_FUNCS(file_extent_generation, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def598]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:957:1: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  955|   
#  956|   BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8);
#  957|-> BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item,
#  958|   		   disk_bytenr, 64);
#  959|   BTRFS_SETGET_FUNCS(file_extent_generation, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def599]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:961:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1291:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1304:23: call_function: inlined call to ‘btrfs_file_extent_disk_num_bytes’ from ‘fill_csum_tree_from_one_fs_root’
#  959|   BTRFS_SETGET_FUNCS(file_extent_generation, struct btrfs_file_extent_item,
#  960|   		   generation, 64);
#  961|-> BTRFS_SETGET_FUNCS(file_extent_disk_num_bytes, struct btrfs_file_extent_item,
#  962|   		   disk_num_bytes, 64);
#  963|   BTRFS_SETGET_FUNCS(file_extent_offset, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:963:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1291:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: call_function: calling ‘populate_csum’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: return_function: returning to ‘fill_csum_tree_from_one_fs_root’ from ‘populate_csum’
btrfs-progs-v6.17.1/check/mode-common.c:1306:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1313:34: call_function: inlined call to ‘btrfs_file_extent_offset’ from ‘fill_csum_tree_from_one_fs_root’
#  961|   BTRFS_SETGET_FUNCS(file_extent_disk_num_bytes, struct btrfs_file_extent_item,
#  962|   		   disk_num_bytes, 64);
#  963|-> BTRFS_SETGET_FUNCS(file_extent_offset, struct btrfs_file_extent_item,
#  964|   		  offset, 64);
#  965|   BTRFS_SETGET_FUNCS(file_extent_num_bytes, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def601]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:963:1: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  961|   BTRFS_SETGET_FUNCS(file_extent_disk_num_bytes, struct btrfs_file_extent_item,
#  962|   		   disk_num_bytes, 64);
#  963|-> BTRFS_SETGET_FUNCS(file_extent_offset, struct btrfs_file_extent_item,
#  964|   		  offset, 64);
#  965|   BTRFS_SETGET_FUNCS(file_extent_num_bytes, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def602]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:965:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1231:12: enter_function: entry to ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1246:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1247:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1250:9: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1254:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1267:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1270:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1280:17: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1286:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1289:25: call_function: inlined call to ‘btrfs_file_extent_disk_bytenr’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1291:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1303:29: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: call_function: calling ‘populate_csum’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1305:23: return_function: returning to ‘fill_csum_tree_from_one_fs_root’ from ‘populate_csum’
btrfs-progs-v6.17.1/check/mode-common.c:1306:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1308:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1312:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1313:34: call_function: inlined call to ‘btrfs_file_extent_offset’ from ‘fill_csum_tree_from_one_fs_root’
btrfs-progs-v6.17.1/check/mode-common.c:1314:31: call_function: inlined call to ‘btrfs_file_extent_num_bytes’ from ‘fill_csum_tree_from_one_fs_root’
#  963|   BTRFS_SETGET_FUNCS(file_extent_offset, struct btrfs_file_extent_item,
#  964|   		  offset, 64);
#  965|-> BTRFS_SETGET_FUNCS(file_extent_num_bytes, struct btrfs_file_extent_item,
#  966|   		   num_bytes, 64);
#  967|   BTRFS_SETGET_FUNCS(file_extent_ram_bytes, struct btrfs_file_extent_item,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:1002:1: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1460:5: enter_function: entry to ‘qgroup_verify_all’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1468:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1471:23: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1472:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: call_function: calling ‘load_quota_info’ from ‘qgroup_verify_all’
# 1000|   BTRFS_SETGET_FUNCS(qgroup_info_generation, struct btrfs_qgroup_info_item,
# 1001|   		   generation, 64);
# 1002|-> BTRFS_SETGET_FUNCS(qgroup_info_rfer, struct btrfs_qgroup_info_item, rfer, 64);
# 1003|   BTRFS_SETGET_FUNCS(qgroup_info_rfer_cmpr, struct btrfs_qgroup_info_item,
# 1004|   		   rfer_cmpr, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def604]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:1003:1: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1460:5: enter_function: entry to ‘qgroup_verify_all’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1468:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1471:23: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1472:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: call_function: calling ‘load_quota_info’ from ‘qgroup_verify_all’
# 1001|   		   generation, 64);
# 1002|   BTRFS_SETGET_FUNCS(qgroup_info_rfer, struct btrfs_qgroup_info_item, rfer, 64);
# 1003|-> BTRFS_SETGET_FUNCS(qgroup_info_rfer_cmpr, struct btrfs_qgroup_info_item,
# 1004|   		   rfer_cmpr, 64);
# 1005|   BTRFS_SETGET_FUNCS(qgroup_info_excl, struct btrfs_qgroup_info_item, excl, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def605]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:1005:1: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1460:5: enter_function: entry to ‘qgroup_verify_all’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1468:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1471:23: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1472:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: call_function: calling ‘load_quota_info’ from ‘qgroup_verify_all’
# 1003|   BTRFS_SETGET_FUNCS(qgroup_info_rfer_cmpr, struct btrfs_qgroup_info_item,
# 1004|   		   rfer_cmpr, 64);
# 1005|-> BTRFS_SETGET_FUNCS(qgroup_info_excl, struct btrfs_qgroup_info_item, excl, 64);
# 1006|   BTRFS_SETGET_FUNCS(qgroup_info_excl_cmpr, struct btrfs_qgroup_info_item,
# 1007|   		   excl_cmpr, 64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def606]
btrfs-progs-v6.17.1/kernel-shared/accessors.h:1006:1: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1460:5: enter_function: entry to ‘qgroup_verify_all’
btrfs-progs-v6.17.1/check/qgroup-verify.c:1468:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1471:23: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1472:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: branch_false: ...to here
btrfs-progs-v6.17.1/check/qgroup-verify.c:1477:15: call_function: calling ‘load_quota_info’ from ‘qgroup_verify_all’
# 1004|   		   rfer_cmpr, 64);
# 1005|   BTRFS_SETGET_FUNCS(qgroup_info_excl, struct btrfs_qgroup_info_item, excl, 64);
# 1006|-> BTRFS_SETGET_FUNCS(qgroup_info_excl_cmpr, struct btrfs_qgroup_info_item,
# 1007|   		   excl_cmpr, 64);
# 1008|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def607]
btrfs-progs-v6.17.1/kernel-shared/ctree.c:1788:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘trans’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:1416:5: enter_function: entry to ‘btrfs_search_slot_for_read’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:1425:15: call_function: calling ‘btrfs_search_slot’ from ‘btrfs_search_slot_for_read’
# 1786|   
# 1787|   	c = path->nodes[level];
# 1788|-> 	WARN_ON(btrfs_header_generation(c) != trans->transid);
# 1789|   	if (c == root->node) {
# 1790|   		/* trying to split the root, lets make a new one */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def608]
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2464:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2466:17: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2495:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2496:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2500:39: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2500:9: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2500:9: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 2498|   		goto error;
# 2499|   	}
# 2500|-> 	read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf,
# 2501|   			    path->slots[0]), item_size);
# 2502|   	slot = path->slots[0] + 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def609]
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2713:14: warning[-Wanalyzer-malloc-leak]: leak of ‘btrfs_alloc_path()’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2805:5: enter_function: entry to ‘btrfs_insert_item’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2814:16: call_function: calling ‘btrfs_alloc_path’ from ‘btrfs_insert_item’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2814:16: return_function: returning to ‘btrfs_insert_item’ from ‘btrfs_alloc_path’
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2815:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2815:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/ctree.c:2818:15: call_function: inlined call to ‘btrfs_insert_empty_item’ from ‘btrfs_insert_item’
# 2711|   
# 2712|   	/* create a root if there isn't one */
# 2713|-> 	if (!root->node)
# 2714|   		BUG();
# 2715|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def610]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1092:16: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_cursor’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
# 1090|   	batch.nr = 1;
# 1091|   
# 1092|-> 	return btrfs_insert_empty_items(trans, root, path, &batch);
# 1093|   }
# 1094|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def611]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1092:16: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1090|   	batch.nr = 1;
# 1091|   
# 1092|-> 	return btrfs_insert_empty_items(trans, root, path, &batch);
# 1093|   }
# 1094|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def612]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1092:16: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1090|   	batch.nr = 1;
# 1091|   
# 1092|-> 	return btrfs_insert_empty_items(trans, root, path, &batch);
# 1093|   }
# 1094|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def613]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/check/mode-common.c:1483:12: enter_function: entry to ‘fill_csum_tree_from_extent’
btrfs-progs-v6.17.1/check/mode-common.c:1498:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1503:30: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1503:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/check/mode-common.c:1504:12: branch_false: ...to here
btrfs-progs-v6.17.1/check/mode-common.c:1510:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/check/mode-common.c:1511:31: call_function: inlined call to ‘btrfs_next_leaf’ from ‘fill_csum_tree_from_extent’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def614]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def615]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def616]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def617]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[0]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def618]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[1]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def619]
btrfs-progs-v6.17.1/kernel-shared/ctree.h:1108:16: warning[-Wanalyzer-malloc-leak]: leak of ‘reserved_ranges[2]’
btrfs-progs-v6.17.1/convert/main.c:1671:12: enter_function: entry to ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
btrfs-progs-v6.17.1/convert/main.c:1699:48: branch_true: ...to here
btrfs-progs-v6.17.1/convert/main.c:1699:38: acquire_memory: allocated here
btrfs-progs-v6.17.1/convert/main.c:1700:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1696:60: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1696:21: branch_false: following ‘false’ branch (when ‘i == 3’)...
btrfs-progs-v6.17.1/convert/main.c:1705:14: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1706:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1711:17: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1719:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1724:9: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1738:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1742:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1749:25: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1765:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1773:20: call_function: inlined call to ‘btrfs_root_dirid’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1777:21: call_function: inlined call to ‘IS_ERR’ from ‘do_rollback’
btrfs-progs-v6.17.1/convert/main.c:1777:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1787:35: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1795:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/convert/main.c:1801:22: branch_false: ...to here
btrfs-progs-v6.17.1/convert/main.c:1807:15: call_function: calling ‘check_convert_image’ from ‘do_rollback’
# 1106|   {
# 1107|   	path->lowest_level = 0;
# 1108|-> 	return btrfs_next_sibling_tree_block(root->fs_info, path);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def620]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:250:16: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1023:12: enter_function: entry to ‘load_global_roots_objectid’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1105:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1108:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1113:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1114:33: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1115:32: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1115:32: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1116:28: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1120:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1125:38: call_function: calling ‘btrfs_find_create_tree_block’ from ‘load_global_roots_objectid’
#  248|   		struct btrfs_fs_info *fs_info, u64 bytenr)
#  249|   {
#  250|-> 	return alloc_extent_buffer(fs_info, bytenr, fs_info->nodesize);
#  251|   }
#  252|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def621]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:843:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1502:30: enter_function: entry to ‘__open_ctree_fd’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1521:19: call_function: calling ‘btrfs_new_fs_info’ from ‘__open_ctree_fd’
#  841|   }
#  842|   
#  843|-> FREE_RB_BASED_TREE(global_roots, __free_global_root);
#  844|   
#  845|   void btrfs_free_fs_info(struct btrfs_fs_info *fs_info)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def622]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:843:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_info’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1502:30: enter_function: entry to ‘__open_ctree_fd’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1521:19: call_function: calling ‘btrfs_new_fs_info’ from ‘__open_ctree_fd’
#  841|   }
#  842|   
#  843|-> FREE_RB_BASED_TREE(global_roots, __free_global_root);
#  844|   
#  845|   void btrfs_free_fs_info(struct btrfs_fs_info *fs_info)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def623]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:887:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1502:30: enter_function: entry to ‘__open_ctree_fd’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1521:19: call_function: calling ‘btrfs_new_fs_info’ from ‘__open_ctree_fd’
#  885|   		goto free_all;
#  886|   
#  887|-> 	extent_buffer_init_cache(fs_info);
#  888|   	extent_io_tree_init(fs_info, &fs_info->dirty_buffers, 0);
#  889|   	extent_io_tree_init(fs_info, &fs_info->free_space_cache, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def624]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:887:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fs_info’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1502:30: enter_function: entry to ‘__open_ctree_fd’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1521:19: call_function: calling ‘btrfs_new_fs_info’ from ‘__open_ctree_fd’
#  885|   		goto free_all;
#  886|   
#  887|-> 	extent_buffer_init_cache(fs_info);
#  888|   	extent_io_tree_init(fs_info, &fs_info->dirty_buffers, 0);
#  889|   	extent_io_tree_init(fs_info, &fs_info->free_space_cache, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def625]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1073:17: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1039:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1046:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1054:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1056:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1059:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1059:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1066:24: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1066:24: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1067:20: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1072:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1073:17: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:1073:17: danger: ‘root’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
# 1071|   
# 1072|   		btrfs_setup_root(root, fs_info, objectid);
# 1073|-> 		read_extent_buffer(path->nodes[0], &root->root_item,
# 1074|   				   btrfs_item_ptr_offset(path->nodes[0],
# 1075|   							 path->slots[0]),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def626]
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2440:16: warning[-Wanalyzer-malloc-leak]: leak of ‘root’
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2433:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2434:12: branch_false: following ‘false’ branch (when ‘root’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2437:41: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2440:16: throw: if ‘btrfs_alloc_tree_block’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/disk-io.c:2440:16: danger: ‘root’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 2438|   	memcpy(&root->root_key, key, sizeof(struct btrfs_key));
# 2439|   
# 2440|-> 	leaf = btrfs_alloc_tree_block(trans, root, 0, root->root_key.objectid,
# 2441|   				      NULL, 0, 0, 0, BTRFS_NESTING_NORMAL);
# 2442|   	if (IS_ERR(leaf)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def627]
btrfs-progs-v6.17.1/kernel-shared/disk-io.h:205:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_resource: opened here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1796:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1933:1: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_true: following ‘true’ branch (when ‘cluster’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1927:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1928:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1928:17: call_function: inlined call to ‘close_ctree’ from ‘restore_metadump’
#  203|   	if (!root)
#  204|   		return 0;
#  205|-> 	return close_ctree_fs_info(root->fs_info);
#  206|   }
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def628]
btrfs-progs-v6.17.1/kernel-shared/disk-io.h:205:16: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
btrfs-progs-v6.17.1/image/image-restore.c:1765:5: enter_function: entry to ‘restore_metadump’
btrfs-progs-v6.17.1/image/image-restore.c:1777:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1780:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/image/image-restore.c:1781:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1788:12: branch_true: following ‘true’ branch (when ‘fixup_offset != 0’)...
btrfs-progs-v6.17.1/image/image-restore.c:1789:40: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1796:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1933:1: branch_false: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1804:12: branch_true: following ‘true’ branch (when ‘cluster’ is NULL)...
btrfs-progs-v6.17.1/image/image-restore.c:1805:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1927:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/image/image-restore.c:1928:17: branch_true: ...to here
btrfs-progs-v6.17.1/image/image-restore.c:1928:17: call_function: inlined call to ‘close_ctree’ from ‘restore_metadump’
#  203|   	if (!root)
#  204|   		return 0;
#  205|-> 	return close_ctree_fs_info(root->fs_info);
#  206|   }
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def629]
btrfs-progs-v6.17.1/kernel-shared/extent-io-tree.c:221:32: warning[-Wanalyzer-malloc-leak]: leak of ‘prealloc’
btrfs-progs-v6.17.1/kernel-shared/extent-io-tree.c:1730:5: enter_function: entry to ‘try_lock_extent’
btrfs-progs-v6.17.1/kernel-shared/extent-io-tree.c:1736:15: call_function: calling ‘__set_extent_bit’ from ‘try_lock_extent’
#  219|   static inline struct extent_state *next_state(struct extent_state *state)
#  220|   {
#  221|-> 	struct rb_node *next = rb_next(&state->rb_node);
#  222|   
#  223|   	if (next)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:1631:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(32)’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2563:23: enter_function: entry to ‘btrfs_alloc_tree_block’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2575:15: call_function: calling ‘alloc_tree_block’ from ‘btrfs_alloc_tree_block’
# 1629|   	flags &= BTRFS_BLOCK_GROUP_TYPE_MASK;
# 1630|   
# 1631|-> 	list_for_each_entry(found, &info->space_info, list) {
# 1632|   		if (found->flags & flags)
# 1633|   			return found;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2701:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cache’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2716:12: enter_function: entry to ‘read_one_block_group’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2733:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2737:12: branch_false: following ‘false’ branch (when ‘cache’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2739:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2739:15: call_function: calling ‘read_block_group_item’ from ‘read_one_block_group’
# 2699|   	cache->length = key->offset;
# 2700|   
# 2701|-> 	read_extent_buffer(leaf, &bgi, btrfs_item_ptr_offset(leaf, slot),
# 2702|   			   sizeof(bgi));
# 2703|   	cache->used = btrfs_stack_block_group_used(&bgi);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2744:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cache’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2733:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2736:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2737:12: branch_false: following ‘false’ branch (when ‘cache’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2739:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2744:9: throw: if ‘set_free_space_tree_thresholds’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:2744:9: danger: ‘cache’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2742|   		return ret;
# 2743|   	}
# 2744|-> 	set_free_space_tree_thresholds(fs_info, cache);
# 2745|   	INIT_LIST_HEAD(&cache->dirty_list);
# 2746|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3016:15: warning[-Wanalyzer-malloc-leak]: leak of ‘cache’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3004:1: enter_function: entry to ‘btrfs_add_block_group’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3010:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3011:9: call_function: inlined call to ‘bugon_trace’ from ‘btrfs_add_block_group’
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3012:9: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3016:15: throw: if ‘btrfs_load_block_group_zone_info’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent-tree.c:3016:15: danger: ‘cache’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
# 3014|   	cache->global_root_id = calculate_global_root_id(fs_info, chunk_offset);
# 3015|   
# 3016|-> 	ret = btrfs_load_block_group_zone_info(fs_info, cache);
# 3017|   	BUG_ON(ret);
# 3018|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def634]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:137:14: warning[-Wanalyzer-malloc-leak]: leak of ‘__alloc_extent_buffer(fs_info,  bytenr,  blocksize)’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:259:23: enter_function: entry to ‘alloc_extent_buffer’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:279:22: call_function: calling ‘__alloc_extent_buffer’ from ‘alloc_extent_buffer’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:279:22: return_function: returning to ‘alloc_extent_buffer’ from ‘__alloc_extent_buffer’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:280:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:282:23: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:282:23: throw: if ‘insert_cache_extent’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:137:14: danger: ‘__alloc_extent_buffer(fs_info,  bytenr,  blocksize)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#  135|   	struct extent_buffer *eb;
#  136|   
#  137|-> 	eb = calloc(1, sizeof(struct extent_buffer) + blocksize);
#  138|   	if (!eb)
#  139|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def635]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)(unsigned int)num_stripes + 63 >> 6, 64)’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:347:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:348:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: call_function: inlined call to ‘bitmap_zalloc’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:369:35: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:367:23: call_function: calling ‘btrfs_pread’ from ‘read_raid56’
#  367|   		ret = btrfs_pread(multi->stripes[i].dev->fd, pointers[i],
#  368|   				  BTRFS_STRIPE_LEN, multi->stripes[i].physical,
#  369|-> 				  fs_info->zoned);
#  370|   		if (ret < BTRFS_STRIPE_LEN)
#  371|   			set_bit(i, failed_stripe_bitmap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:380:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)(unsigned int)num_stripes + 63 >> 6, 64)’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: call_function: inlined call to ‘bitmap_zalloc’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:380:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:394:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: throw: if ‘raid56_recov’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:380:17: danger: ‘calloc((long unsigned int)(unsigned int)num_stripes + 63 >> 6, 64)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  378|   	 * stripe where @logical lies in is definitely corrupted.
#  379|   	 */
#  380|-> 	set_bit((logical - full_stripe_start) / BTRFS_STRIPE_LEN, failed_stripe_bitmap);
#  381|   
#  382|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def637]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:341:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:380:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:394:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: throw: if ‘raid56_recov’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: danger: ‘pointers’ leaks here; was allocated at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
#  405|   
#  406|   	/* Rebuild the full stripe */
#  407|-> 	ret = raid56_recov(num_stripes, BTRFS_STRIPE_LEN, multi->type,
#  408|   			   failed_a, failed_b, pointers);
#  409|   	ASSERT(ret == 0);

Error: GCC_ANALYZER_WARNING (CWE-127): [#def638]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:412:21: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:320:12: enter_function: entry to ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: following ‘false’ branch (when ‘pointers’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:342:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:346:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:354:32: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:355:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:366:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:380:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:394:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: call_function: inlined call to ‘find_next_bit’ from ‘read_raid56’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:399:9: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:407:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:412:21: danger: out-of-bounds read from byte -8 till byte -1 but region starts at byte 0
#  410|   
#  411|   	/* Now copy the data back to original buf */
#  412|-> 	memcpy(buf, pointers[failed_a] + (logical - full_stripe_start) %
#  413|   			BTRFS_STRIPE_LEN, len);
#  414|   	ret = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def639]
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:526:31: warning[-Wanalyzer-malloc-leak]: leak of ‘eb’
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:495:16: branch_true: following ‘true’ branch (when ‘bytes_left != 0’)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:496:17: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:501:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:507:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:507:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:509:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:514:30: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:515:28: branch_false: following ‘false’ branch (when ‘eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:521:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:526:31: throw: if ‘write_raid56_with_parity’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/extent_io.c:526:31: danger: ‘eb’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  524|   
#  525|   			memcpy(eb->data, buf + total_write, this_len);
#  526|-> 			ret = write_raid56_with_parity(info, eb, multi,
#  527|   						       stripe_len, raid_map);
#  528|   			BUG_ON(ret < 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:118:15: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  116|   	key.offset = 0;
#  117|   
#  118|-> 	ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
#  119|   	if (ret) {
#  120|   		fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:123:17: warning[-Wanalyzer-malloc-leak]: leak of ‘io_ctl.buffer’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:286:12: enter_function: entry to ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:313:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:315:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:320:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:331:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:336:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:29: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:341:13: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:13: call_function: inlined call to ‘btrfs_inode_generation’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:346:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:357:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:359:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:48: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: call_function: calling ‘io_ctl_init’ from ‘__load_free_space_cache’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:362:15: return_function: returning to ‘__load_free_space_cache’ from ‘io_ctl_init’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:363:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:366:15: call_function: calling ‘io_ctl_prepare_pages’ from ‘__load_free_space_cache’
#  121|   		       "Couldn't find file extent item for free space inode"
#  122|   		       " %llu\n", ino);
#  123|-> 		btrfs_release_path(path);
#  124|   		return -EINVAL;
#  125|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:623:29: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  621|   			 * we should return it instead of the bitmap entry
#  622|   			 */
#  623|-> 			n = rb_prev(&entry->offset_index);
#  624|   			if (n) {
#  625|   				prev = rb_entry(n, struct btrfs_free_space,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def643]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:641:21: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  639|   	entry = prev;
#  640|   	if (entry->offset > offset) {
#  641|-> 		n = rb_prev(&entry->offset_index);
#  642|   		if (n) {
#  643|   			entry = rb_entry(n, struct btrfs_free_space,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:655:21: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  653|   
#  654|   	if (entry->bitmap) {
#  655|-> 		n = rb_prev(&entry->offset_index);
#  656|   		if (n) {
#  657|   			prev = rb_entry(n, struct btrfs_free_space,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def645]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:765:27: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  763|   	 */
#  764|   	right_info = tree_search_offset(ctl, offset + bytes, 0, 0);
#  765|-> 	if (right_info && rb_prev(&right_info->offset_index))
#  766|   		left_info = rb_entry(rb_prev(&right_info->offset_index),
#  767|   				     struct btrfs_free_space, offset_index);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def646]
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:766:29: warning[-Wanalyzer-malloc-leak]: leak of ‘info’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:842:5: enter_function: entry to ‘btrfs_add_free_space’
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:848:16: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:849:12: branch_false: following ‘false’ branch (when ‘info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:852:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-cache.c:855:9: call_function: calling ‘try_merge_free_space’ from ‘btrfs_add_free_space’
#  764|   	right_info = tree_search_offset(ctl, offset + bytes, 0, 0);
#  765|   	if (right_info && rb_prev(&right_info->offset_index))
#  766|-> 		left_info = rb_entry(rb_prev(&right_info->offset_index),
#  767|   				     struct btrfs_free_space, offset_index);
#  768|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:191:35: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_bitmap((unsigned int)(*block_group.length / (long long unsigned int)*fs_info.sectorsize) + 7 >> 3)’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
#  189|   	unsigned long *ret;
#  190|   	unsigned int nofs_flag;
#  191|-> 	u32 bitmap_rounded_size = round_up(bitmap_size, sizeof(unsigned long));
#  192|   
#  193|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def648]
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:347:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_cursor’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
#  345|   		leaf = path->nodes[0];
#  346|   		ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
#  347|-> 		write_extent_buffer(leaf, bitmap_cursor, ptr,
#  348|   				    data_size);
#  349|   		btrfs_mark_buffer_dirty(leaf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:349:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_cursor’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
#  347|   		write_extent_buffer(leaf, bitmap_cursor, ptr,
#  348|   				    data_size);
#  349|-> 		btrfs_mark_buffer_dirty(leaf);
#  350|   		btrfs_release_path(path);
#  351|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def650]
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap_cursor’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:496:12: enter_function: entry to ‘update_free_space_extent_count’
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:511:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:515:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:524:28: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:523:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/free-space-tree.c:525:23: call_function: calling ‘convert_free_space_to_bitmaps’ from ‘update_free_space_extent_count’
#  348|   				    data_size);
#  349|   		btrfs_mark_buffer_dirty(leaf);
#  350|-> 		btrfs_release_path(path);
#  351|   
#  352|   		i += extent_size;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def651]
btrfs-progs-v6.17.1/kernel-shared/messages.c:322:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/messages.c:311:9: acquire_resource: ‘va_start’ called here
btrfs-progs-v6.17.1/kernel-shared/messages.c:322:9: throw: if ‘btrfs_no_printk’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/messages.c:322:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  320|   
#  321|   
#  322|-> 	btrfs_crit(fs_info, "panic in %s:%d: " PV_FMT " (error=%d %s)",
#  323|   		   function, line, PV_VAL(vaf), error, errstr);
#  324|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def652]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:95:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2057:30: enter_function: entry to ‘__btrfs_check_node’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2066:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2067:17: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2067:17: call_function: calling ‘generic_err’ from ‘__btrfs_check_node’
#   93|   	vaf.va = &args;
#   94|   
#   95|-> 	btrfs_crit(fs_info,
#   96|   		"corrupt %s: root=%llu block=%llu slot=%d, %pV",
#   97|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def653]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:124:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
#  122|   	vaf.va = &args;
#  123|   
#  124|-> 	btrfs_crit(fs_info,
#  125|   	"corrupt %s: root=%llu block=%llu slot=%d ino=%llu file_offset=%llu, %pV",
#  126|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def654]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:186:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:205:13: enter_function: entry to ‘check_prev_ino’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:227:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:231:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:231:9: call_function: calling ‘dir_item_err’ from ‘check_prev_ino’
#  184|   	vaf.va = &args;
#  185|   
#  186|-> 	btrfs_crit(fs_info,
#  187|   		"corrupt %s: root=%llu block=%llu slot=%d ino=%llu, %pV",
#  188|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def655]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:689:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
#  687|   	vaf.va = &args;
#  688|   
#  689|-> 	btrfs_crit(fs_info,
#  690|   	"corrupt %s: root=%llu block=%llu slot=%d bg_start=%llu bg_len=%llu, %pV",
#  691|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def656]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:819:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
#  817|   
#  818|   	if (is_sb)
#  819|-> 		btrfs_crit(fs_info,
#  820|   		"corrupt superblock syschunk array: chunk_start=%llu, %pV",
#  821|   			   logical, &vaf);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def657]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:823:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
#  821|   			   logical, &vaf);
#  822|   	else
#  823|-> 		btrfs_crit(fs_info,
#  824|   	"corrupt leaf: root=%llu block=%llu slot=%d chunk_start=%llu, %pV",
#  825|   			   BTRFS_CHUNK_TREE_OBJECTID, leaf->start, slot,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def658]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:1049:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
# 1047|   	vaf.va = &args;
# 1048|   
# 1049|-> 	btrfs_crit(eb->fs_info,
# 1050|   	"corrupt %s: root=%llu block=%llu slot=%d devid=%llu %pV",
# 1051|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def659]
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:1306:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2046:5: enter_function: entry to ‘btrfs_check_leaf’
btrfs-progs-v6.17.1/kernel-shared/tree-checker.c:2050:15: call_function: calling ‘__btrfs_check_leaf’ from ‘btrfs_check_leaf’
# 1304|   	vaf.va = &args;
# 1305|   
# 1306|-> 	btrfs_crit(eb->fs_info,
# 1307|   	"corrupt %s: block=%llu slot=%d extent bytenr=%llu len=%llu %pV",
# 1308|   		btrfs_header_level(eb) == 0 ? "leaf" : "node",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:774:15: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  772|   	ASSERT(IS_ALIGNED(*hole_start, device->zone_info->zone_size));
#  773|   
#  774|-> 	pos = btrfs_find_allocatable_zones(device, *hole_start,
#  775|   					   *hole_start + *hole_size, num_bytes);
#  776|   	if (pos != *hole_start) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:774:15: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  772|   	ASSERT(IS_ALIGNED(*hole_start, device->zone_info->zone_size));
#  773|   
#  774|-> 	pos = btrfs_find_allocatable_zones(device, *hole_start,
#  775|   					   *hole_start + *hole_size, num_bytes);
#  776|   	if (pos != *hole_start) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:858:16: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  856|   	search_start = dev_extent_search_start(device, search_start);
#  857|   
#  858|-> 	path = btrfs_alloc_path();
#  859|   	if (!path)
#  860|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:858:16: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  856|   	search_start = dev_extent_search_start(device, search_start);
#  857|   
#  858|-> 	path = btrfs_alloc_path();
#  859|   	if (!path)
#  860|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def664]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:877:15: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  875|   	key.offset = search_start;
#  876|   
#  877|-> 	ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
#  878|   	if (ret < 0)
#  879|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def665]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:877:15: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  875|   	key.offset = search_start;
#  876|   
#  877|-> 	ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
#  878|   	if (ret < 0)
#  879|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:881:23: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  879|   		goto out;
#  880|   	if (ret > 0) {
#  881|-> 		ret = btrfs_previous_item(root, path, key.objectid, key.type);
#  882|   		if (ret < 0)
#  883|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def667]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:881:23: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  879|   		goto out;
#  880|   	if (ret > 0) {
#  881|-> 		ret = btrfs_previous_item(root, path, key.objectid, key.type);
#  882|   		if (ret < 0)
#  883|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def668]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:953:25: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  951|   		if (dev_extent_hole_check(device, &search_start, &hole_size,
#  952|   					  num_bytes)) {
#  953|-> 			btrfs_release_path(path);
#  954|   			goto again;
#  955|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def669]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:953:25: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
#  951|   		if (dev_extent_hole_check(device, &search_start, &hole_size,
#  952|   					  num_bytes)) {
#  953|-> 			btrfs_release_path(path);
#  954|   			goto again;
#  955|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1004:16: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1002|   	       IS_ALIGNED(start, device->zone_info->zone_size));
# 1003|   
# 1004|-> 	path = btrfs_alloc_path();
# 1005|   	if (!path)
# 1006|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1004:16: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1002|   	       IS_ALIGNED(start, device->zone_info->zone_size));
# 1003|   
# 1004|-> 	path = btrfs_alloc_path();
# 1005|   	if (!path)
# 1006|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def672]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1024:9: warning[-Wanalyzer-malloc-leak]: leak of ‘chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1022|   	btrfs_set_dev_extent_chunk_offset(leaf, extent, chunk_offset);
# 1023|   
# 1024|-> 	write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid,
# 1025|   		    (unsigned long)btrfs_dev_extent_chunk_tree_uuid(extent),
# 1026|   		    BTRFS_UUID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def673]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1024:9: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1795:5: enter_function: entry to ‘btrfs_alloc_data_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1803:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1809:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1827:16: call_function: calling ‘create_chunk’ from ‘btrfs_alloc_data_chunk’
# 1022|   	btrfs_set_dev_extent_chunk_offset(leaf, extent, chunk_offset);
# 1023|   
# 1024|-> 	write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid,
# 1025|   		    (unsigned long)btrfs_dev_extent_chunk_tree_uuid(extent),
# 1026|   		    BTRFS_UUID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def674]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1956:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1903:5: enter_function: entry to ‘btrfs_rmap_block’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1917:9: call_function: inlined call to ‘bugon_trace’ from ‘btrfs_rmap_block’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1920:9: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1926:17: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1931:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1931:15: acquire_memory: this call could return NULL
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1933:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1934:21: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1951:29: branch_false: following ‘false’ branch (when ‘j >= nr’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1955:20: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1955:20: branch_true: following ‘true’ branch (when ‘j == nr’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1956:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:1956:25: danger: ‘buf + (long unsigned int)nr * 8’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/6)
# 1954|   		}
# 1955|   		if (j == nr)
# 1956|-> 			buf[nr++] = bytenr;
# 1957|   	}
# 1958|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def675]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2390:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘device’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2389:18: acquire_memory: this call could return NULL
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2390:9: danger: ‘device’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
# 2388|   
# 2389|   	device = kzalloc(sizeof(*device), GFP_NOFS);
# 2390|-> 	device->devid = devid;
# 2391|   	memcpy(device->uuid, uuid, BTRFS_UUID_SIZE);
# 2392|   	device->fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def676]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2453:17: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2401:12: enter_function: entry to ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2449:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2451:25: call_function: inlined call to ‘btrfs_stripe_offset_nr’ from ‘read_one_chunk’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2453:17: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2453:17: danger: ‘map’ leaks here; was allocated at [(4)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/3)
# 2451|   			btrfs_stripe_offset_nr(leaf, chunk, i);
# 2452|   		devid = btrfs_stripe_devid_nr(leaf, chunk, i);
# 2453|-> 		read_extent_buffer(leaf, uuid, (unsigned long)
# 2454|   				   btrfs_stripe_dev_uuid_nr(chunk, i),
# 2455|   				   BTRFS_UUID_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def677]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2468:15: warning[-Wanalyzer-malloc-leak]: leak of ‘map’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2421:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2428:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2435:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2436:12: branch_false: following ‘false’ branch (when ‘map’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2439:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2449:21: branch_false: following ‘false’ branch (when ‘i >= num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2468:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2468:15: throw: if ‘insert_cache_extent’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2468:15: danger: ‘map’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
# 2466|   
# 2467|   	}
# 2468|-> 	ret = insert_cache_extent(&map_tree->cache_tree, &map->ce);
# 2469|   	if (ret < 0) {
# 2470|   		errno = -ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def678]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2743:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2770:12: enter_function: entry to ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: following ‘false’ branch (when ‘tmp_ebs’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2792:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:30: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2792:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2798:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2799:51: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2801:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2804:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2812:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: call_function: calling ‘rmw_eb’ from ‘split_eb_for_raid56’
# 2741|   	unsigned long copy_len = eb->len;
# 2742|   
# 2743|-> 	ret = read_whole_eb(info, eb, 0);
# 2744|   	if (ret)
# 2745|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def679]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2743:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ebs’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2843:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
# 2741|   	unsigned long copy_len = eb->len;
# 2742|   
# 2743|-> 	ret = read_whole_eb(info, eb, 0);
# 2744|   	if (ret)
# 2745|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def680]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2743:15: warning[-Wanalyzer-malloc-leak]: leak of ‘eb’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2770:12: enter_function: entry to ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: following ‘false’ branch (when ‘tmp_ebs’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:30: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2792:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2798:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2799:51: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2801:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2804:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2812:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: call_function: calling ‘rmw_eb’ from ‘split_eb_for_raid56’
# 2741|   	unsigned long copy_len = eb->len;
# 2742|   
# 2743|-> 	ret = read_whole_eb(info, eb, 0);
# 2744|   	if (ret)
# 2745|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def681]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2743:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2844:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
# 2741|   	unsigned long copy_len = eb->len;
# 2742|   
# 2743|-> 	ret = read_whole_eb(info, eb, 0);
# 2744|   	if (ret)
# 2745|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def682]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2743:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp_ebs’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2770:12: enter_function: entry to ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2782:19: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: following ‘false’ branch (when ‘tmp_ebs’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2783:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2788:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2791:40: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2792:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2787:38: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2798:21: branch_true: following ‘true’ branch (when ‘i < num_stripes’)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2799:51: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2801:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2804:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2812:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2814:31: call_function: calling ‘rmw_eb’ from ‘split_eb_for_raid56’
# 2741|   	unsigned long copy_len = eb->len;
# 2742|   
# 2743|-> 	ret = read_whole_eb(info, eb, 0);
# 2744|   	if (ret)
# 2745|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def683]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2862:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2862:32: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2862:29: danger: use of uninitialized value ‘*<unknown>’ here
# 2860|   		struct extent_buffer *new_eb;
# 2861|   		if (raid_map[i] < BTRFS_RAID5_P_STRIPE) {
# 2862|-> 			if (ebs[i]->start != raid_map[i]) {
# 2863|   				ret = -EINVAL;
# 2864|   				goto out_free_split;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def684]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: warning[-Wanalyzer-malloc-leak]: leak of ‘new_eb’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: danger: ‘new_eb’ leaks here; was allocated at [(21)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/20)
# 2866|   			continue;
# 2867|   		}
# 2868|-> 		new_eb = kmalloc(sizeof(*eb) + alloc_size, GFP_KERNEL);
# 2869|   		if (!new_eb) {
# 2870|   			ret = -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def685]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ebs’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2843:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_true: following ‘true’ branch (when ‘q_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2883:21: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2886:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: throw: if ‘raid6_gen_syndrome’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: danger: ‘ebs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/1)
# 2887|   			pointers[i] = ebs[i]->data;
# 2888|   
# 2889|-> 		raid6_gen_syndrome(multi->num_stripes, stripe_len, pointers);
# 2890|   	} else {
# 2891|   		ebs[multi->num_stripes - 1] = p_eb;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def686]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2844:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_true: following ‘true’ branch (when ‘q_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2883:21: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2886:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: throw: if ‘raid6_gen_syndrome’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2889:17: danger: ‘pointers’ leaks here; was allocated at [(2)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/1)
# 2887|   			pointers[i] = ebs[i]->data;
# 2888|   
# 2889|-> 		raid6_gen_syndrome(multi->num_stripes, stripe_len, pointers);
# 2890|   	} else {
# 2891|   		ebs[multi->num_stripes - 1] = p_eb;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def687]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: warning[-Wanalyzer-malloc-leak]: leak of ‘ebs’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2843:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_false: following ‘false’ branch (when ‘q_eb’ is NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2891:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2892:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: throw: if ‘raid5_gen_result’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: danger: ‘ebs’ leaks here; was allocated at [(2)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/1)
# 2892|   		for (i = 0; i < multi->num_stripes; i++)
# 2893|   			pointers[i] = ebs[i]->data;
# 2894|-> 		ret = raid5_gen_result(multi->num_stripes, stripe_len,
# 2895|   				       multi->num_stripes - 1, pointers);
# 2896|   		if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def688]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: warning[-Wanalyzer-malloc-leak]: leak of ‘new_eb’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_false: following ‘false’ branch (when ‘q_eb’ is NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2891:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2892:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: throw: if ‘raid5_gen_result’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: danger: ‘new_eb’ leaks here; was allocated at [(21)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/20)
# 2892|   		for (i = 0; i < multi->num_stripes; i++)
# 2893|   			pointers[i] = ebs[i]->data;
# 2894|-> 		ret = raid5_gen_result(multi->num_stripes, stripe_len,
# 2895|   				       multi->num_stripes - 1, pointers);
# 2896|   		if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def689]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: warning[-Wanalyzer-malloc-leak]: leak of ‘pointers’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2844:20: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_false: following ‘false’ branch (when ‘q_eb’ is NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2891:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2892:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: throw: if ‘raid5_gen_result’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: danger: ‘pointers’ leaks here; was allocated at [(2)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/1)
# 2892|   		for (i = 0; i < multi->num_stripes; i++)
# 2893|   			pointers[i] = ebs[i]->data;
# 2894|-> 		ret = raid5_gen_result(multi->num_stripes, stripe_len,
# 2895|   				       multi->num_stripes - 1, pointers);
# 2896|   		if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def690]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2897:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_eb’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2869:20: branch_false: following ‘false’ branch (when ‘new_eb’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2873:17: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2877:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2879:25: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2882:12: branch_false: following ‘false’ branch (when ‘q_eb’ is NULL)...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2891:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2892:29: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2894:23: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2909:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2913:1: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2897:25: danger: ‘new_eb’ leaks here; was allocated at [(21)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/20)
# 2895|   				       multi->num_stripes - 1, pointers);
# 2896|   		if (ret < 0)
# 2897|-> 			goto out_free_split;
# 2898|   	}
# 2899|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def691]
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2910:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2832:5: enter_function: entry to ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2845:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:13: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2851:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: call_function: calling ‘split_eb_for_raid56’ from ‘write_raid56_with_parity’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2854:15: return_function: returning to ‘write_raid56_with_parity’ from ‘split_eb_for_raid56’
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2856:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2859:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:29: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2861:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2868:26: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2909:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2910:24: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/volumes.c:2910:21: danger: use of uninitialized value ‘*<unknown>’ here
# 2908|   out_free_split:
# 2909|   	for (i = 0; i < multi->num_stripes; i++) {
# 2910|-> 		if (ebs[i] != eb)
# 2911|   			kfree(ebs[i]);
# 2912|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def692]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:83:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#   81|   	ret = stat(file, &st);
#   82|   	if (ret < 0) {
#   83|-> 		error("zoned: unable to stat %s", file);
#   84|   		return -ENOENT;
#   85|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def693]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:91:15: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#   89|   		return ZONED_NONE;
#   90|   
#   91|-> 	ret = device_get_queue_param(file, "zoned", model, sizeof(model));
#   92|   	if (ret <= 0)
#   93|   		return ZONED_NONE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def694]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:113:23: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#  111|   		u64 size = DEFAULT_EMULATED_ZONE_SIZE;
#  112|   
#  113|-> 		tmp = bconf_param_value("zone-size");
#  114|   		if (tmp) {
#  115|   			size = arg_strtou64_with_suffix(tmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def695]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:115:32: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#  113|   		tmp = bconf_param_value("zone-size");
#  114|   		if (tmp) {
#  115|-> 			size = arg_strtou64_with_suffix(tmp);
#  116|   			if (!is_power_of_2(size) || size < BTRFS_MIN_ZONE_SIZE ||
#  117|   			    size > BTRFS_MAX_ZONE_SIZE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def696]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:118:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#  116|   			if (!is_power_of_2(size) || size < BTRFS_MIN_ZONE_SIZE ||
#  117|   			    size > BTRFS_MAX_ZONE_SIZE) {
#  118|-> 				error("invalid emulated zone size %llu", size);
#  119|   				exit(1);
#  120|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def697]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:126:15: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#  124|   	}
#  125|   
#  126|-> 	ret = device_get_queue_param(file, "chunk_sectors", chunk, sizeof(chunk));
#  127|   	if (ret <= 0)
#  128|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def698]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:315:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zinfo’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1432:5: enter_function: entry to ‘btrfs_get_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1447:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1448:12: branch_false: following ‘false’ branch (when ‘zinfo’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1453:9: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1456:15: call_function: calling ‘report_zones’ from ‘btrfs_get_zone_info’
#  313|   	 */
#  314|   	if (!zone_bytes || !is_power_of_2(zone_bytes)) {
#  315|-> 		error("zoned: illegal zone size %llu (not a power of 2)",
#  316|   		      zone_bytes);
#  317|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def699]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:805:35: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  803|   				   u64 *offset_ret)
#  804|   {
#  805|-> 	struct btrfs_root *root = btrfs_extent_root(fs_info, cache->start);
#  806|   	struct btrfs_path *path;
#  807|   	struct btrfs_key key;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def700]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:812:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  810|   	u64 length;
#  811|   
#  812|-> 	path = btrfs_alloc_path();
#  813|   	if (!path)
#  814|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def701]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:820:15: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  818|   	key.offset = 0;
#  819|   
#  820|-> 	ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
#  821|   	/* There should be no exact match (ie. an extent) at this address */
#  822|   	if (!ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def702]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:827:15: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  825|   		goto out;
#  826|   
#  827|-> 	ret = btrfs_previous_extent_item(root, path, cache->start);
#  828|   	if (ret) {
#  829|   		if (ret == 1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def703]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:852:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1237:23: call_function: calling ‘calculate_alloc_pointer’ from ‘btrfs_load_block_group_zone_info’
#  850|   
#  851|   out:
#  852|-> 	btrfs_free_path(path);
#  853|   	return ret;
#  854|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:936:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
#  934|   
#  935|   	if (zone.type == BLK_ZONE_TYPE_CONVENTIONAL) {
#  936|-> 		error("zoned: unexpected conventional zone %llu on device %s (devid %llu)",
#  937|   		      zone.start << SECTOR_SHIFT, device->name,
#  938|   		      device->devid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def705]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:947:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
#  945|   	case BLK_ZONE_COND_OFFLINE:
#  946|   	case BLK_ZONE_COND_READONLY:
#  947|-> 		error(
#  948|   	"zoned: offline/readonly zone %llu on device %s (devid %llu)",
#  949|   		      info->physical / fs_info->zone_size, device->name,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:975:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1259:23: call_function: calling ‘btrfs_load_block_group_single’ from ‘btrfs_load_block_group_zone_info’
#  973|   {
#  974|   	if (info->alloc_offset == WP_MISSING_DEV) {
#  975|-> 		btrfs_err(fs_info,
#  976|   			"zoned: cannot recover write pointer for zone %llu",
#  977|   			info->physical);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:995:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1262:23: call_function: calling ‘btrfs_load_block_group_dup’ from ‘btrfs_load_block_group_zone_info’
#  993|   {
#  994|   	if ((map->type & BTRFS_BLOCK_GROUP_DATA) && !fs_info->stripe_root) {
#  995|-> 		btrfs_err(fs_info, "zoned: data DUP profile needs raid-stripe-tree");
#  996|   		return -EINVAL;
#  997|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1002:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1262:23: call_function: calling ‘btrfs_load_block_group_dup’ from ‘btrfs_load_block_group_zone_info’
# 1000|   
# 1001|   	if (zone_info[0].alloc_offset == WP_MISSING_DEV) {
# 1002|-> 		btrfs_err(fs_info,
# 1003|   			  "zoned: cannot recover write pointer for zone %llu",
# 1004|   			  zone_info[0].physical);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1008:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1262:23: call_function: calling ‘btrfs_load_block_group_dup’ from ‘btrfs_load_block_group_zone_info’
# 1006|   	}
# 1007|   	if (zone_info[1].alloc_offset == WP_MISSING_DEV) {
# 1008|-> 		btrfs_err(fs_info,
# 1009|   			  "zoned: cannot recover write pointer for zone %llu",
# 1010|   			  zone_info[1].physical);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1020:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1262:23: call_function: calling ‘btrfs_load_block_group_dup’ from ‘btrfs_load_block_group_zone_info’
# 1018|   
# 1019|   	if (zone_info[0].alloc_offset != zone_info[1].alloc_offset) {
# 1020|-> 		btrfs_err(fs_info,
# 1021|   			  "zoned: write pointer offset mismatch of zones in DUP profile");
# 1022|   		return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1044:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1267:23: call_function: calling ‘btrfs_load_block_group_raid1’ from ‘btrfs_load_block_group_zone_info’
# 1042|   
# 1043|   	if ((map->type & BTRFS_BLOCK_GROUP_DATA) && !fs_info->stripe_root) {
# 1044|-> 		btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
# 1045|   			  btrfs_bg_type_to_raid_name(map->type));
# 1046|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-127): [#def712]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1075:36: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1267:23: call_function: calling ‘btrfs_load_block_group_raid1’ from ‘btrfs_load_block_group_zone_info’
# 1073|   		bg->alloc_offset = zone_info[0].alloc_offset;
# 1074|   	else
# 1075|-> 		bg->alloc_offset = zone_info[i - 1].alloc_offset;
# 1076|   
# 1077|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1087:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1270:23: call_function: calling ‘btrfs_load_block_group_raid0’ from ‘btrfs_load_block_group_zone_info’
# 1085|   {
# 1086|   	if ((map->type & BTRFS_BLOCK_GROUP_DATA) && !fs_info->stripe_root) {
# 1087|-> 		btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
# 1088|   			  btrfs_bg_type_to_raid_name(map->type));
# 1089|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1132:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1273:23: call_function: calling ‘btrfs_load_block_group_raid10’ from ‘btrfs_load_block_group_zone_info’
# 1130|   {
# 1131|   	if ((map->type & BTRFS_BLOCK_GROUP_DATA) && !fs_info->stripe_root) {
# 1132|-> 		btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
# 1133|   			  btrfs_bg_type_to_raid_name(map->type));
# 1134|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:25: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)(unsigned int)*(struct map_lookup *)<unknown>.num_stripes + 63 >> 6, 64)’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: call_function: inlined call to ‘bitmap_zalloc’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:25: danger: ‘calloc((long unsigned int)(unsigned int)*(struct map_lookup *)<unknown>.num_stripes + 63 >> 6, 64)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/10)
# 1223|   	}
# 1224|   
# 1225|-> 	for (i = 0; i < map->num_stripes; i++) {
# 1226|   		ret = btrfs_load_zone_info(fs_info, i, &zone_info[i], active, map);
# 1227|   		if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1242:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1173:5: enter_function: entry to ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:66: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: call_function: calling ‘btrfs_load_zone_info’ from ‘btrfs_load_block_group_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1226:23: return_function: returning to ‘btrfs_load_block_group_zone_info’ from ‘btrfs_load_zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1227:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:21: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1230:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1231:25: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_true: following ‘true’ branch (when ‘num_conventional != 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1236:40: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1238:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1242:33: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1242:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1242:33: danger: ‘zone_info’ leaks here; was allocated at [(8)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/7)
# 1240|   				cache->alloc_offset = last_alloc;
# 1241|   			else
# 1242|-> 				error(
# 1243|   		"zoned: failed to determine allocation offset of block group %llu",
# 1244|   					  cache->start);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1278:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zone_info’
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1193:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1194:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1205:14: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1206:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:28: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1212:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1213:12: branch_false: following ‘false’ branch (when ‘zone_info’ is non-NULL)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1218:18: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1219:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1225:21: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1234:12: branch_false: following ‘false’ branch (when ‘num_conventional == 0’)...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:51: branch_false: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1249:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1256:19: branch_true: ...to here
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1278:17: throw: if ‘btrfs_bg_type_to_raid_name’ throws an exception...
btrfs-progs-v6.17.1/kernel-shared/zoned.c:1278:17: danger: ‘zone_info’ leaks here; was allocated at [(7)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/6)
# 1276|   	case BTRFS_BLOCK_GROUP_RAID6:
# 1277|   	default:
# 1278|-> 		error("zoned: profile %s not yet supported",
# 1279|   		      btrfs_bg_type_to_raid_name(map->type));
# 1280|   		ret = -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
btrfs-progs-v6.17.1/kernel-shared/zoned.h:117:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/common/device-scan.c:129:5: enter_function: entry to ‘btrfs_add_to_fsid’
btrfs-progs-v6.17.1/common/device-scan.c:148:12: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:151:15: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:151:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/common/device-scan.c:152:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/common/device-scan.c:160:23: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:174:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:179:13: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:179:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:187:9: branch_false: ...to here
btrfs-progs-v6.17.1/common/device-scan.c:189:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/common/device-scan.c:192:9: call_function: inlined call to ‘btrfs_set_super_total_bytes’ from ‘btrfs_add_to_fsid’
btrfs-progs-v6.17.1/common/device-scan.c:209:15: call_function: inlined call to ‘sbwrite’ from ‘btrfs_add_to_fsid’
#  115|   static inline size_t sbwrite(int fd, void *buf, off_t offset)
#  116|   {
#  117|-> 	return btrfs_sb_io(fd, buf, offset, WRITE);
#  118|   }
#  119|   

Error: CPPCHECK_WARNING (CWE-476): [#def719]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:390: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  388|   	tree_insert(&s->path_subvols, si, subvol_search_by_path);
#  389|   
#  390|-> 	cnt = count_bytes(si->uuid, BTRFS_UUID_SIZE, 0);
#  391|   	if (cnt != BTRFS_UUID_SIZE)
#  392|   		tree_insert(&s->local_subvols, si, subvol_search_by_uuid);

Error: CPPCHECK_WARNING (CWE-476): [#def720]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:393: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  391|   	if (cnt != BTRFS_UUID_SIZE)
#  392|   		tree_insert(&s->local_subvols, si, subvol_search_by_uuid);
#  393|-> 	cnt = count_bytes(si->received_uuid, BTRFS_UUID_SIZE, 0);
#  394|   	if (cnt != BTRFS_UUID_SIZE)
#  395|   		tree_insert(&s->received_subvols, si,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:575:14: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol_uuid_search2(s,  root_id,  uuid,  transid,  path,  type)’
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:481:21: enter_function: entry to ‘subvol_uuid_search’
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:488:14: call_function: calling ‘subvol_uuid_search2’ from ‘subvol_uuid_search’
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:488:14: return_function: returning to ‘subvol_uuid_search’ from ‘subvol_uuid_search2’
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:575:14: danger: ‘subvol_uuid_search2(s,  root_id,  uuid,  transid,  path,  type)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  573|   
#  574|   #ifdef BTRFS_COMPAT_SEND_NO_UUID_TREE
#  575|-> 	if (!s->uuid_tree_existed)
#  576|   		return subvol_uuid_search_old(s, root_id, uuid, transid,
#  577|   					     path, type);

Error: CPPCHECK_WARNING (CWE-476): [#def722]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:782: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  780|   
#  781|   				si = calloc(1, sizeof(*si));
#  782|-> 				si->root_id = btrfs_search_header_objectid(sh);
#  783|   				memcpy(si->uuid, root_item.uuid,
#  784|   						BTRFS_UUID_SIZE);

Error: CPPCHECK_WARNING (CWE-476): [#def723]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:783: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  781|   				si = calloc(1, sizeof(*si));
#  782|   				si->root_id = btrfs_search_header_objectid(sh);
#  783|-> 				memcpy(si->uuid, root_item.uuid,
#  784|   						BTRFS_UUID_SIZE);
#  785|   				memcpy(si->parent_uuid, root_item.parent_uuid,

Error: CPPCHECK_WARNING (CWE-476): [#def724]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:785: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  783|   				memcpy(si->uuid, root_item.uuid,
#  784|   						BTRFS_UUID_SIZE);
#  785|-> 				memcpy(si->parent_uuid, root_item.parent_uuid,
#  786|   						BTRFS_UUID_SIZE);
#  787|   				memcpy(si->received_uuid,

Error: CPPCHECK_WARNING (CWE-476): [#def725]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:787: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  785|   				memcpy(si->parent_uuid, root_item.parent_uuid,
#  786|   						BTRFS_UUID_SIZE);
#  787|-> 				memcpy(si->received_uuid,
#  788|   						root_item.received_uuid,
#  789|   						BTRFS_UUID_SIZE);

Error: CPPCHECK_WARNING (CWE-476): [#def726]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:790: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  788|   						root_item.received_uuid,
#  789|   						BTRFS_UUID_SIZE);
#  790|-> 				si->ctransid = btrfs_root_ctransid(&root_item);
#  791|   				si->otransid = btrfs_root_otransid(&root_item);
#  792|   				si->stransid = btrfs_root_stransid(&root_item);

Error: CPPCHECK_WARNING (CWE-476): [#def727]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:791: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  789|   						BTRFS_UUID_SIZE);
#  790|   				si->ctransid = btrfs_root_ctransid(&root_item);
#  791|-> 				si->otransid = btrfs_root_otransid(&root_item);
#  792|   				si->stransid = btrfs_root_stransid(&root_item);
#  793|   				si->rtransid = btrfs_root_rtransid(&root_item);

Error: CPPCHECK_WARNING (CWE-476): [#def728]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:792: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  790|   				si->ctransid = btrfs_root_ctransid(&root_item);
#  791|   				si->otransid = btrfs_root_otransid(&root_item);
#  792|-> 				si->stransid = btrfs_root_stransid(&root_item);
#  793|   				si->rtransid = btrfs_root_rtransid(&root_item);
#  794|   				si->path = path;

Error: CPPCHECK_WARNING (CWE-476): [#def729]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:793: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  791|   				si->otransid = btrfs_root_otransid(&root_item);
#  792|   				si->stransid = btrfs_root_stransid(&root_item);
#  793|-> 				si->rtransid = btrfs_root_rtransid(&root_item);
#  794|   				si->path = path;
#  795|   				subvol_uuid_search_add(s, si);

Error: CPPCHECK_WARNING (CWE-476): [#def730]
btrfs-progs-v6.17.1/libbtrfs/send-utils.c:794: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si
#  792|   				si->stransid = btrfs_root_stransid(&root_item);
#  793|   				si->rtransid = btrfs_root_rtransid(&root_item);
#  794|-> 				si->path = path;
#  795|   				subvol_uuid_search_add(s, si);
#  796|   				root_item_valid = 0;

Error: CPPCHECK_WARNING (CWE-401): [#def731]
btrfs-progs-v6.17.1/libbtrfsutil/qgroup.c:64: error[memleakOnRealloc]: Common realloc mistake: 'tmp' nulled but not freed upon failure
#   62|   	struct btrfs_qgroup_inherit *tmp = (struct btrfs_qgroup_inherit *)*inherit;
#   63|   
#   64|-> 	tmp = realloc(tmp, sizeof(*tmp) +
#   65|   		      (tmp->num_qgroups + 1) * sizeof(tmp->qgroups[0]));
#   66|   	if (!tmp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def732]
btrfs-progs-v6.17.1/mkfs/common.c:435:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:434:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:435:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:435:17: throw: if ‘uuid_generate’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:435:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  433|   	num_bytes = (cfg->num_bytes / cfg->sectorsize) * cfg->sectorsize;
#  434|   	if (!*cfg->fs_uuid) {
#  435|-> 		uuid_generate(super.fsid);
#  436|   		uuid_unparse(super.fsid, cfg->fs_uuid);
#  437|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def733]
btrfs-progs-v6.17.1/mkfs/common.c:436:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:434:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:435:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:436:17: throw: if ‘uuid_unparse’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:436:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  434|   	if (!*cfg->fs_uuid) {
#  435|   		uuid_generate(super.fsid);
#  436|-> 		uuid_unparse(super.fsid, cfg->fs_uuid);
#  437|   	} else {
#  438|   		uuid_parse(cfg->fs_uuid, super.fsid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def734]
btrfs-progs-v6.17.1/mkfs/common.c:438:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:434:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:438:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:438:17: throw: if ‘uuid_parse’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:438:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  436|   		uuid_unparse(super.fsid, cfg->fs_uuid);
#  437|   	} else {
#  438|-> 		uuid_parse(cfg->fs_uuid, super.fsid);
#  439|   	}
#  440|   	if (!*cfg->dev_uuid) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
btrfs-progs-v6.17.1/mkfs/common.c:441:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:440:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:441:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:441:17: throw: if ‘uuid_generate’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:441:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  439|   	}
#  440|   	if (!*cfg->dev_uuid) {
#  441|-> 		uuid_generate(super.dev_item.uuid);
#  442|   		uuid_unparse(super.dev_item.uuid, cfg->dev_uuid);
#  443|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def736]
btrfs-progs-v6.17.1/mkfs/common.c:442:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:440:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:441:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:442:17: throw: if ‘uuid_unparse’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:442:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  440|   	if (!*cfg->dev_uuid) {
#  441|   		uuid_generate(super.dev_item.uuid);
#  442|-> 		uuid_unparse(super.dev_item.uuid, cfg->dev_uuid);
#  443|   	} else {
#  444|   		uuid_parse(cfg->dev_uuid, super.dev_item.uuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def737]
btrfs-progs-v6.17.1/mkfs/common.c:444:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:440:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:444:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:444:17: throw: if ‘uuid_parse’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:444:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  442|   		uuid_unparse(super.dev_item.uuid, cfg->dev_uuid);
#  443|   	} else {
#  444|-> 		uuid_parse(cfg->dev_uuid, super.dev_item.uuid);
#  445|   	}
#  446|   	uuid_generate(chunk_tree_uuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def738]
btrfs-progs-v6.17.1/mkfs/common.c:446:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/common.c:424:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/common.c:425:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/common.c:428:22: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:446:9: throw: if ‘uuid_generate’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:446:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  444|   		uuid_parse(cfg->dev_uuid, super.dev_item.uuid);
#  445|   	}
#  446|-> 	uuid_generate(chunk_tree_uuid);
#  447|   
#  448|   	for (i = 0; i < blocks_nr; i++) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def739]
btrfs-progs-v6.17.1/mkfs/common.c:984:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 0)’
btrfs-progs-v6.17.1/mkfs/common.c:981:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/common.c:982:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:984:15: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:984:15: throw: if ‘pread’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:984:15: danger: ‘open(device, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  982|   	if (fd < 0)
#  983|   		return -1;
#  984|-> 	ret = pread(fd, &sb, BTRFS_SUPER_INFO_SIZE, 0);
#  985|   	if (ret < 0) {
#  986|   		ret = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def740]
btrfs-progs-v6.17.1/mkfs/common.c:1181:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
btrfs-progs-v6.17.1/mkfs/common.c:1177:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/common.c:1178:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:1180:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:1180:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:1181:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:1181:17: danger: ‘open(file, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1179|   		return -errno;
# 1180|   	if (stat(file, &statbuf) < 0) {
# 1181|-> 		close(fd);
# 1182|   		return -errno;
# 1183|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def741]
btrfs-progs-v6.17.1/mkfs/common.c:1184:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
btrfs-progs-v6.17.1/mkfs/common.c:1177:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/common.c:1178:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:1180:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:1180:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/common.c:1184:15: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/common.c:1184:15: throw: if ‘device_get_partition_size_fd_stat’ throws an exception...
btrfs-progs-v6.17.1/mkfs/common.c:1184:15: danger: ‘open(file, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1182|   		return -errno;
# 1183|   	}
# 1184|-> 	ret = device_get_partition_size_fd_stat(fd, &statbuf, &size);
# 1185|   	close(fd);
# 1186|   	if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol’
btrfs-progs-v6.17.1/mkfs/main.c:1191:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1192:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1197:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1199:12: branch_true: following ‘true’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: throw: if ‘string_has_prefix’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: danger: ‘subvol’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1198|   
# 1199|   	if (colon) {
# 1200|-> 		if (!string_has_prefix(optarg, "default:")) {
# 1201|   			subvol->is_default = true;
# 1202|   			valid_prefix = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def743]
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol’
btrfs-progs-v6.17.1/mkfs/main.c:1191:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1192:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1197:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1199:12: branch_true: following ‘true’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1200:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: throw: if ‘string_has_prefix’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: danger: ‘subvol’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1201|   			subvol->is_default = true;
# 1202|   			valid_prefix = true;
# 1203|-> 		} else if (!string_has_prefix(optarg, "ro:")) {
# 1204|   			subvol->readonly = true;
# 1205|   			valid_prefix = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
btrfs-progs-v6.17.1/mkfs/main.c:1206:29: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol’
btrfs-progs-v6.17.1/mkfs/main.c:1191:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1192:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1197:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1199:12: branch_true: following ‘true’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1200:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1203:27: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1206:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1206:29: throw: if ‘string_has_prefix’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1206:29: danger: ‘subvol’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1204|   			subvol->readonly = true;
# 1205|   			valid_prefix = true;
# 1206|-> 		} else if (!string_has_prefix(optarg, "rw:")) {
# 1207|   			subvol->readonly = false;
# 1208|   			valid_prefix = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
btrfs-progs-v6.17.1/mkfs/main.c:1209:29: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol’
btrfs-progs-v6.17.1/mkfs/main.c:1191:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1192:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1197:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1199:12: branch_true: following ‘true’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1200:22: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1200:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1203:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1203:27: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1206:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1206:27: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1209:29: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1209:29: throw: if ‘string_has_prefix’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1209:29: danger: ‘subvol’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1207|   			subvol->readonly = false;
# 1208|   			valid_prefix = true;
# 1209|-> 		} else if (!string_has_prefix(optarg, "default-ro:")) {
# 1210|   			subvol->is_default = true;
# 1211|   			subvol->readonly = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def746]
btrfs-progs-v6.17.1/mkfs/main.c:1216:13: warning[-Wanalyzer-malloc-leak]: leak of ‘subvol’
btrfs-progs-v6.17.1/mkfs/main.c:1191:18: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1192:12: branch_false: following ‘false’ branch (when ‘subvol’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1197:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1199:12: branch_false: following ‘false’ branch (when ‘colon’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1216:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1216:13: throw: if ‘arg_copy_path’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1216:13: danger: ‘subvol’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1214|   	}
# 1215|   
# 1216|-> 	if (arg_copy_path(subvol->dir, valid_prefix ? colon + 1 : optarg,
# 1217|   			  sizeof(subvol->dir))) {
# 1218|   		error("--subvol path too long");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def747]
btrfs-progs-v6.17.1/mkfs/main.c:1254:17: warning[-Wanalyzer-malloc-leak]: leak of ‘option_dup’
btrfs-progs-v6.17.1/mkfs/main.c:1245:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_true: following ‘true’ branch (when ‘entry’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1254:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1254:17: throw: if ‘error_msg’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1254:17: danger: ‘option_dup’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1252|   	if (!entry) {
# 1253|   		ret = -ENOMEM;
# 1254|-> 		error_mem(NULL);
# 1255|   		goto cleanup;
# 1256|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def748]
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_true: following ‘true’ branch (when ‘colon’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1257|   	colon = strstr(option_dup, ":");
# 1258|   	if (!colon) {
# 1259|-> 		error("invalid inode flags: %s", option);
# 1260|   		ret = -EINVAL;
# 1261|   		goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def749]
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: warning[-Wanalyzer-malloc-leak]: leak of ‘option_dup’
btrfs-progs-v6.17.1/mkfs/main.c:1245:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_true: following ‘true’ branch (when ‘colon’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1259:17: danger: ‘option_dup’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1257|   	colon = strstr(option_dup, ":");
# 1258|   	if (!colon) {
# 1259|-> 		error("invalid inode flags: %s", option);
# 1260|   		ret = -EINVAL;
# 1261|   		goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def750]
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1263:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1266:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1269:21: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1269:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/mkfs/main.c:1271:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1271:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 1272|   			entry->nodatasum = true;
# 1273|   		} else {
# 1274|-> 			error("unknown flag: %s", token);
# 1275|   			ret = -EINVAL;
# 1276|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def751]
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: warning[-Wanalyzer-malloc-leak]: leak of ‘option_dup’
btrfs-progs-v6.17.1/mkfs/main.c:1245:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1263:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1266:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1269:21: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1269:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/mkfs/main.c:1271:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1271:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1274:25: danger: ‘option_dup’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1272|   			entry->nodatasum = true;
# 1273|   		} else {
# 1274|-> 			error("unknown flag: %s", token);
# 1275|   			ret = -EINVAL;
# 1276|   			goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def752]
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: warning[-Wanalyzer-malloc-leak]: leak of ‘entry’
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1263:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1266:16: branch_false: following ‘false’ branch (when ‘token’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1281:46: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: throw: if ‘arg_copy_path’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: danger: ‘entry’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 1279|   	}
# 1280|   
# 1281|-> 	if (arg_copy_path(entry->inode_path, colon + 1, sizeof(entry->inode_path))) {
# 1282|   		error("--inode-flags path too long");
# 1283|   		ret = -E2BIG;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def753]
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: warning[-Wanalyzer-malloc-leak]: leak of ‘option_dup’
btrfs-progs-v6.17.1/mkfs/main.c:1245:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1263:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1266:16: branch_false: following ‘false’ branch (when ‘token’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1281:46: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: throw: if ‘arg_copy_path’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1281:13: danger: ‘option_dup’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 1279|   	}
# 1280|   
# 1281|-> 	if (arg_copy_path(entry->inode_path, colon + 1, sizeof(entry->inode_path))) {
# 1282|   		error("--inode-flags path too long");
# 1283|   		ret = -E2BIG;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def754]
btrfs-progs-v6.17.1/mkfs/main.c:1282:17: warning[-Wanalyzer-malloc-leak]: leak of ‘option_dup’
btrfs-progs-v6.17.1/mkfs/main.c:1245:22: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1246:12: branch_false: following ‘false’ branch (when ‘option_dup’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1251:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1252:12: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1257:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1258:12: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1263:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1266:16: branch_false: following ‘false’ branch (when ‘token’ is NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1281:46: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1281:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1282:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1282:17: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1282:17: danger: ‘option_dup’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1280|   
# 1281|   	if (arg_copy_path(entry->inode_path, colon + 1, sizeof(entry->inode_path))) {
# 1282|-> 		error("--inode-flags path too long");
# 1283|   		ret = -E2BIG;
# 1284|   		goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def755]
btrfs-progs-v6.17.1/mkfs/main.c:1359:25: warning[-Wanalyzer-malloc-leak]: leak of ‘bitmap’
btrfs-progs-v6.17.1/mkfs/main.c:1307:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1317:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1317:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1320:27: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1327:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/main.c:1327:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1353:34: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1354:28: branch_false: following ‘false’ branch (when ‘bitmap’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/main.c:1360:44: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1359:25: throw: if ‘read_extent_buffer’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1359:25: danger: ‘bitmap’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
# 1357|   			}
# 1358|   
# 1359|-> 			read_extent_buffer(leaf, bitmap,
# 1360|   					   btrfs_item_ptr_offset(leaf, path.slots[0]),
# 1361|   					   size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def756]
btrfs-progs-v6.17.1/mkfs/main.c:1542:39: warning[-Wanalyzer-malloc-leak]: leak of ‘orig’
btrfs-progs-v6.17.1/mkfs/main.c:1499:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/mkfs/main.c:1501:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1539:46: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1542:39: throw: if ‘btrfs_parse_fs_features’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1542:39: danger: ‘orig’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 1540|   				char *tmp = orig;
# 1541|   
# 1542|-> 				tmp = btrfs_parse_fs_features(tmp, &features);
# 1543|   				if (tmp) {
# 1544|   					error("unrecognized filesystem feature '%s'",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def757]
btrfs-progs-v6.17.1/mkfs/main.c:1562:33: warning[-Wanalyzer-malloc-leak]: leak of ‘orig’
btrfs-progs-v6.17.1/mkfs/main.c:1499:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/mkfs/main.c:1501:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1559:46: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1562:33: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1562:33: danger: ‘orig’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1560|   				char *tmp = orig;
# 1561|   
# 1562|-> 				warning("runtime features are deprecated, use -O|--features instead");
# 1563|   				tmp = btrfs_parse_runtime_features(tmp,
# 1564|   						&features);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def758]
btrfs-progs-v6.17.1/mkfs/main.c:1563:39: warning[-Wanalyzer-malloc-leak]: leak of ‘orig’
btrfs-progs-v6.17.1/mkfs/main.c:1499:20: branch_false: following ‘false’ branch (when ‘c >= 0’)...
btrfs-progs-v6.17.1/mkfs/main.c:1501:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/main.c:1559:46: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/main.c:1563:39: throw: if ‘btrfs_parse_runtime_features’ throws an exception...
btrfs-progs-v6.17.1/mkfs/main.c:1563:39: danger: ‘orig’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 1561|   
# 1562|   				warning("runtime features are deprecated, use -O|--features instead");
# 1563|-> 				tmp = btrfs_parse_runtime_features(tmp,
# 1564|   						&features);
# 1565|   				if (tmp) {

Error: GCC_ANALYZER_WARNING (CWE-415): [#def759]
btrfs-progs-v6.17.1/mkfs/rootdir.c:180:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘current_path.inode_list.prev + -16’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1634:12: enter_function: entry to ‘ftw_add_inode’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1647:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1647:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1722:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1723:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1723:17: call_function: calling ‘rootdir_path_pop’ from ‘ftw_add_inode’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1723:17: return_function: returning to ‘ftw_add_inode’ from ‘rootdir_path_pop’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1722:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1723:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1723:17: call_function: calling ‘rootdir_path_pop’ from ‘ftw_add_inode’
#  178|   	list_del_init(&last->list);
#  179|   	path->level--;
#  180|-> 	free(last);
#  181|   }
#  182|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def760]
btrfs-progs-v6.17.1/mkfs/rootdir.c:818:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘source.fd’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1415:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1422:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: call_function: calling ‘add_file_item_extent’ from ‘add_file_items’
#  816|   		ssize_t ret_read;
#  817|   
#  818|-> 		ret_read = pread(source->fd, source->buf + bytes_read,
#  819|   				 to_read - bytes_read, file_pos + bytes_read);
#  820|   		if (ret_read < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def761]
btrfs-progs-v6.17.1/mkfs/rootdir.c:818:28: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1361:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1415:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1422:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: call_function: calling ‘add_file_item_extent’ from ‘add_file_items’
#  816|   		ssize_t ret_read;
#  817|   
#  818|-> 		ret_read = pread(source->fd, source->buf + bytes_read,
#  819|   				 to_read - bytes_read, file_pos + bytes_read);
#  820|   		if (ret_read < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def762]
btrfs-progs-v6.17.1/mkfs/rootdir.c:926:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘source.fd’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1415:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1422:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: call_function: calling ‘add_file_item_extent’ from ‘add_file_items’
#  924|   	}
#  925|   
#  926|-> 	ret = btrfs_reserve_extent(trans, root, to_write, 0, 0,
#  927|   				   (u64)-1, &key, 1);
#  928|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def763]
btrfs-progs-v6.17.1/mkfs/rootdir.c:926:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1361:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1407:19: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1415:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1422:16: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1423:23: call_function: calling ‘add_file_item_extent’ from ‘add_file_items’
#  924|   	}
#  925|   
#  926|-> 	ret = btrfs_reserve_extent(trans, root, to_write, 0, 0,
#  927|   				   (u64)-1, &key, 1);
#  928|   	if (ret)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def764]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1005:20: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
btrfs-progs-v6.17.1/mkfs/rootdir.c:988:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:993:15: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:993:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:994:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1000:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1005:20: throw: if ‘deflate’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1005:20: danger: ‘out’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1003|   	strm.avail_in = size;
# 1004|   
# 1005|-> 	zlib_ret = deflate(&strm, Z_FINISH);
# 1006|   	if (zlib_ret != Z_OK && zlib_ret != Z_STREAM_END) {
# 1007|   		error("deflate failed: %s", strm.msg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def765]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1053:17: warning[-Wanalyzer-malloc-leak]: leak of ‘wrkmem’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1305:13: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1308:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1314:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1321:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1328:31: call_function: calling ‘lzo_compress_inline_extent’ from ‘add_file_items’
# 1051|   	out = malloc(out_size);
# 1052|   	if (!out) {
# 1053|-> 		error_mem(NULL);
# 1054|   		ret = -ENOMEM;
# 1055|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def766]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1058:15: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1051:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1052:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1058:43: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1058:15: throw: if ‘lzo1x_1_compress’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1058:15: danger: ‘out’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1056|   	}
# 1057|   
# 1058|-> 	ret = lzo1x_1_compress(buf, size, out + LZO_LEN + LZO_LEN, &out_len,
# 1059|   			       wrkmem);
# 1060|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def767]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1058:15: warning[-Wanalyzer-malloc-leak]: leak of ‘wrkmem’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1267:12: enter_function: entry to ‘add_file_items’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1305:13: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1308:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1314:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1321:17: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1328:31: call_function: calling ‘lzo_compress_inline_extent’ from ‘add_file_items’
# 1056|   	}
# 1057|   
# 1058|-> 	ret = lzo1x_1_compress(buf, size, out + LZO_LEN + LZO_LEN, &out_len,
# 1059|   			       wrkmem);
# 1060|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def768]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1137:20: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1100:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1105:20: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1107:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1114:20: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1115:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1122:15: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1122:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1123:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1129:9: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1137:20: throw: if ‘ZSTD_compressStream2’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1137:20: danger: ‘out’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
# 1135|   	input.size = size;
# 1136|   
# 1137|-> 	zstd_ret = ZSTD_compressStream2(zstd_ctx, &output, &input, ZSTD_e_end);
# 1138|   
# 1139|   	if (ZSTD_isError(zstd_ret)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def769]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_name, 0)’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: acquire_resource: opened here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: danger: ‘open(path_name, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 1288|   	}
# 1289|   
# 1290|-> 	if (g_compression == BTRFS_COMPRESS_LZO) {
# 1291|   #if COMPRESSION_LZO
# 1292|   		wrkmem = malloc(LZO1X_1_MEM_COMPRESS);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def770]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1305:13: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1308:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: throw: if ‘pread’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: danger: ‘buffer’ leaks here; was allocated at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
# 1311|   		}
# 1312|   
# 1313|-> 		ret_read = pread(fd, buffer, st->st_size, 0);
# 1314|   		if (ret_read == -1) {
# 1315|   			error("cannot read %s at offset %u length %zu: %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def771]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: warning[-Wanalyzer-malloc-leak]: leak of ‘wrkmem’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1305:13: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1308:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: throw: if ‘pread’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: danger: ‘wrkmem’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
# 1311|   		}
# 1312|   
# 1313|-> 		ret_read = pread(fd, buffer, st->st_size, 0);
# 1314|   		if (ret_read == -1) {
# 1315|   			error("cannot read %s at offset %u length %zu: %m",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def772]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1315:25: warning[-Wanalyzer-malloc-leak]: leak of ‘wrkmem’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1305:13: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1306:32: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1308:20: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1313:28: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1314:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1315:25: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1315:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1315:25: danger: ‘wrkmem’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
# 1313|   		ret_read = pread(fd, buffer, st->st_size, 0);
# 1314|   		if (ret_read == -1) {
# 1315|-> 			error("cannot read %s at offset %u length %zu: %m",
# 1316|   			      path_name, 0, st->st_size);
# 1317|   			free(buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def773]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1361:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1384:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1391:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1396:23: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1397:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
# 1396|   		ret = lzo_init();
# 1397|   		if (ret) {
# 1398|-> 			error("lzo_init returned %i", ret);
# 1399|   			ret = -EINVAL;
# 1400|   			goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def774]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: warning[-Wanalyzer-malloc-leak]: leak of ‘comp_buf’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1384:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1390:28: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1391:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1396:23: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1397:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: danger: ‘comp_buf’ leaks here; was allocated at [(13)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/12)
# 1396|   		ret = lzo_init();
# 1397|   		if (ret) {
# 1398|-> 			error("lzo_init returned %i", ret);
# 1399|   			ret = -EINVAL;
# 1400|   			goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def775]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: warning[-Wanalyzer-malloc-leak]: leak of ‘wrkmem’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1281:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1284:14: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1285:12: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1290:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1292:26: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1293:20: branch_false: following ‘false’ branch (when ‘wrkmem’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1304:13: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1362:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1367:12: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1384:17: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1391:20: branch_false: following ‘false’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1396:23: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1397:20: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: branch_true: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: throw: if ‘__btrfs_printf’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1398:25: danger: ‘wrkmem’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
# 1396|   		ret = lzo_init();
# 1397|   		if (ret) {
# 1398|-> 			error("lzo_init returned %i", ret);
# 1399|   			ret = -EINVAL;
# 1400|   			goto end;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def776]
btrfs-progs-v6.17.1/mkfs/rootdir.c:1537:21: warning[-Wanalyzer-malloc-leak]: leak of ‘path_dump’
btrfs-progs-v6.17.1/mkfs/rootdir.c:1534:21: acquire_memory: allocated here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1535:12: branch_false: following ‘false’ branch (when ‘path_dump’ is non-NULL)...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1537:21: branch_false: ...to here
btrfs-progs-v6.17.1/mkfs/rootdir.c:1537:21: throw: if ‘path_basename’ throws an exception...
btrfs-progs-v6.17.1/mkfs/rootdir.c:1537:21: danger: ‘path_dump’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 1535|   	if (!path_dump)
# 1536|   		return -ENOMEM;
# 1537|-> 	base_path = path_basename(path_dump);
# 1538|   	if (!base_path) {
# 1539|   		ret = -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def777]
btrfs-progs-v6.17.1/tune/change-csum.c:146:26: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/tune/change-csum.c:180:12: enter_function: entry to ‘generate_new_csum_range’
btrfs-progs-v6.17.1/tune/change-csum.c:189:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/tune/change-csum.c:190:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/tune/change-csum.c:190:12: branch_false: ...to here
btrfs-progs-v6.17.1/tune/change-csum.c:193:33: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/tune/change-csum.c:194:23: branch_true: ...to here
btrfs-progs-v6.17.1/tune/change-csum.c:194:23: call_function: calling ‘read_verify_one_data_sector’ from ‘generate_new_csum_range’
#  144|   {
#  145|   	const u32 sectorsize = fs_info->sectorsize;
#  146|-> 	int num_copies = btrfs_num_copies(fs_info, logical, sectorsize);
#  147|   	bool found_good = false;
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def778]
btrfs-progs-v6.17.1/tune/change-csum.c:154:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
btrfs-progs-v6.17.1/tune/change-csum.c:180:12: enter_function: entry to ‘generate_new_csum_range’
btrfs-progs-v6.17.1/tune/change-csum.c:189:15: acquire_memory: allocated here
btrfs-progs-v6.17.1/tune/change-csum.c:190:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
btrfs-progs-v6.17.1/tune/change-csum.c:190:12: branch_false: ...to here
btrfs-progs-v6.17.1/tune/change-csum.c:193:33: branch_true: following ‘true’ branch...
btrfs-progs-v6.17.1/tune/change-csum.c:194:23: branch_true: ...to here
btrfs-progs-v6.17.1/tune/change-csum.c:194:23: call_function: calling ‘read_verify_one_data_sector’ from ‘generate_new_csum_range’
#  152|   		int ret;
#  153|   
#  154|-> 		ret = read_data_from_disk(fs_info, data_buf, logical, &readlen,
#  155|   					  mirror);
#  156|   		if (ret < 0) {

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-220.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-namebtrfs-progs-6.17.1-2.fc44
store-results-to/tmp/tmpz7dycnz1/btrfs-progs-6.17.1-2.fc44.tar.xz
time-created2026-01-08 15:47:27
time-finished2026-01-08 15:50:19
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpz7dycnz1/btrfs-progs-6.17.1-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpz7dycnz1/btrfs-progs-6.17.1-2.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9