Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
alsa-lib-1.2.15.1/include/local.h:263:68: warning[-Wanalyzer-malloc-leak]: leak of 'base_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2283:12: enter_function: entry to 'verb_strip_single_device_index'
alsa-lib-1.2.15.1/src/ucm/parser.c:2291:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2294:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2294:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2295:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2298:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2298:23: call_function: calling 'parse_device_index' from 'verb_strip_single_device_index'
#  261|   #define safe_strtol_base _snd_safe_strtol_base
#  262|   int _snd_safe_strtol_base(const char *str, long *val, int base);
#  263|-> static inline int safe_strtol(const char *str, long *val) { return safe_strtol_base(str, val, 0); }
#  264|   #define safe_strtod _snd_safe_strtod
#  265|   int _snd_safe_strtod(const char *str, double *val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
alsa-lib-1.2.15.1/include/local.h:263:68: warning[-Wanalyzer-malloc-leak]: leak of 'norm_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2192:12: enter_function: entry to 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2214:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: call_function: calling 'parse_device_index' from 'verb_normalize_device_names'
#  261|   #define safe_strtol_base _snd_safe_strtol_base
#  262|   int _snd_safe_strtol_base(const char *str, long *val, int base);
#  263|-> static inline int safe_strtol(const char *str, long *val) { return safe_strtol_base(str, val, 0); }
#  264|   #define safe_strtod _snd_safe_strtod
#  265|   int _snd_safe_strtod(const char *str, double *val);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
alsa-lib-1.2.15.1/include/local.h:263:68: warning[-Wanalyzer-malloc-leak]: leak of 'orig_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2192:12: enter_function: entry to 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2214:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: call_function: calling 'parse_device_index' from 'verb_normalize_device_names'
#  261|   #define safe_strtol_base _snd_safe_strtol_base
#  262|   int _snd_safe_strtol_base(const char *str, long *val, int base);
#  263|-> static inline int safe_strtol(const char *str, long *val) { return safe_strtol_base(str, val, 0); }
#  264|   #define safe_strtod _snd_safe_strtod
#  265|   int _snd_safe_strtod(const char *str, double *val);

Error: COMPILER_WARNING: [#def4]
alsa-lib-1.2.15.1/src/error.c:31: included_from: Included from here.
alsa-lib-1.2.15.1/include/local.h:318:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_lib_error' defined but not used
#  318 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.15.1/src/error.c:454:1: note: in expansion of macro 'link_warning'
#  454 | link_warning(snd_lib_error, "Warning: snd_lib_error is deprecated, use snd_log interface");
#      | ^~~~~~~~~~~~
#  316|   #   define link_warning(symbol, msg) \
#  317|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  318|->   static const char __evoke_link_warning_##symbol[]	\
#  319|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  320|   #  endif

Error: COMPILER_WARNING: [#def5]
alsa-lib-1.2.15.1/include/local.h:318:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_lib_error_set_local' defined but not used
#  318 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.15.1/src/error.c:423:1: note: in expansion of macro 'link_warning'
#  423 | link_warning(snd_lib_error_set_local, "Warning: snd_lib_error_set_local is deprecated, use snd_lib_log_set_local");
#      | ^~~~~~~~~~~~
#  316|   #   define link_warning(symbol, msg) \
#  317|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  318|->   static const char __evoke_link_warning_##symbol[]	\
#  319|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  320|   #  endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
alsa-lib-1.2.15.1/src/confeval.c:228:17: warning[-Wanalyzer-malloc-leak]: leak of 'm'
alsa-lib-1.2.15.1/src/confeval.c:261:5: enter_function: entry to 'snd_config_evaluate_string'
alsa-lib-1.2.15.1/src/confeval.c:264:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confeval.c:267:13: branch_true: ...to here
alsa-lib-1.2.15.1/src/confeval.c:267:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confeval.c:269:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/confeval.c:269:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confeval.c:270:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/confeval.c:270:23: call_function: calling '_snd_eval_string' from 'snd_config_evaluate_string'
#  226|   	}
#  227|   	if (pos != OP && pos != END) {
#  228|-> 		snd_error(CORE, "incomplete expression '%s'", save);
#  229|   		return -EINVAL;
#  230|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
alsa-lib-1.2.15.1/src/confmisc.c:436:33: warning[-Wanalyzer-malloc-leak]: leak of 'res'
alsa-lib-1.2.15.1/src/confmisc.c:416:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:420:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:421:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:421:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:427:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:428:43: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:435:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:440:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:443:36: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:448:40: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:450:36: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
alsa-lib-1.2.15.1/src/confmisc.c:455:33: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:427:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:428:43: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:432:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:434:31: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:435:28: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:436:33: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:436:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/confmisc.c:436:33: danger: 'res' leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  434|   			err = safe_strtol(id, &i);
#  435|   			if (err < 0) {
#  436|-> 				snd_error(CORE, "id of field %s is not an integer", id);
#  437|   				err = -EINVAL;
#  438|   				goto __error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
alsa-lib-1.2.15.1/src/confmisc.c:444:41: warning[-Wanalyzer-malloc-leak]: leak of 'res'
alsa-lib-1.2.15.1/src/confmisc.c:416:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:420:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:421:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:421:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:427:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:428:43: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:435:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:440:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:443:36: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:448:40: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:450:36: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
alsa-lib-1.2.15.1/src/confmisc.c:455:33: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:427:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:428:43: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:432:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:434:31: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:435:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/confmisc.c:440:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:440:28: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:441:33: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:443:36: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/confmisc.c:444:41: branch_true: ...to here
alsa-lib-1.2.15.1/src/confmisc.c:444:41: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/confmisc.c:444:41: danger: 'res' leaks here; was allocated at [(11)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/10)
#  442|   				err = snd_config_get_ascii(n, &ptr);
#  443|   				if (err < 0) {
#  444|-> 					snd_error(CORE, "invalid ascii string for id %s", id);
#  445|   					err = -EINVAL;
#  446|   					goto __error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
alsa-lib-1.2.15.1/src/control/namehint.c:271:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  269|   	else
#  270|   		strcpy(buf, name);
#  271|-> 	eh = snd_lib_log_set_local(&zero_handler);
#  272|   	err = snd_config_search_definition(config, base, buf, &res);
#  273|   	snd_lib_log_set_local(eh);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
alsa-lib-1.2.15.1/src/control/namehint.c:273:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  271|   	eh = snd_lib_log_set_local(&zero_handler);
#  272|   	err = snd_config_search_definition(config, base, buf, &res);
#  273|-> 	snd_lib_log_set_local(eh);
#  274|   	if (err < 0)
#  275|   		goto __skip_add;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
alsa-lib-1.2.15.1/src/control/namehint.c:303:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  301|   		if (snd_config_search(cfg1, "device", &cfg) >= 0) {
#  302|   			if (snd_config_get_integer(cfg, &dev) < 0) {
#  303|-> 				snd_error(CONTROL, "(%s) device must be an integer", buf);
#  304|   				err = -EINVAL;
#  305|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
alsa-lib-1.2.15.1/src/control/namehint.c:303:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  301|   		if (snd_config_search(cfg1, "device", &cfg) >= 0) {
#  302|   			if (snd_config_get_integer(cfg, &dev) < 0) {
#  303|-> 				snd_error(CONTROL, "(%s) device must be an integer", buf);
#  304|   				err = -EINVAL;
#  305|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
alsa-lib-1.2.15.1/src/control/namehint.c:312:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  310|   	if (snd_config_search(cfg1, "hint", &cfg) >= 0) {
#  311|   		if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) {
#  312|-> 			snd_error(CONTROL, "hint (%s) must be a compound", buf);
#  313|   			err = -EINVAL;
#  314|   			goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
alsa-lib-1.2.15.1/src/control/namehint.c:312:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  310|   	if (snd_config_search(cfg1, "hint", &cfg) >= 0) {
#  311|   		if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) {
#  312|-> 			snd_error(CONTROL, "hint (%s) must be a compound", buf);
#  313|   			err = -EINVAL;
#  314|   			goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
alsa-lib-1.2.15.1/src/control/namehint.c:335:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  333|   		if (snd_config_search(cfg, "device", &n) >= 0) {
#  334|   			if (snd_config_get_integer(n, &dev) < 0) {
#  335|-> 				snd_error(CONTROL, "(%s) device must be an integer", buf);
#  336|   				err = -EINVAL;
#  337|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
alsa-lib-1.2.15.1/src/control/namehint.c:335:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  333|   		if (snd_config_search(cfg, "device", &n) >= 0) {
#  334|   			if (snd_config_get_integer(n, &dev) < 0) {
#  335|-> 				snd_error(CONTROL, "(%s) device must be an integer", buf);
#  336|   				err = -EINVAL;
#  337|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
alsa-lib-1.2.15.1/src/control/namehint.c:344:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  342|   		if (snd_config_search(cfg, "device_input", &n) >= 0) {
#  343|   			if (snd_config_get_integer(n, &list->device_input) < 0) {
#  344|-> 				snd_error(CONTROL, "(%s) device_input must be an integer", buf);
#  345|   				err = -EINVAL;
#  346|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
alsa-lib-1.2.15.1/src/control/namehint.c:344:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  342|   		if (snd_config_search(cfg, "device_input", &n) >= 0) {
#  343|   			if (snd_config_get_integer(n, &list->device_input) < 0) {
#  344|-> 				snd_error(CONTROL, "(%s) device_input must be an integer", buf);
#  345|   				err = -EINVAL;
#  346|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
alsa-lib-1.2.15.1/src/control/namehint.c:354:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  352|   		if (snd_config_search(cfg, "device_output", &n) >= 0) {
#  353|   			if (snd_config_get_integer(n, &list->device_output) < 0) {
#  354|-> 				snd_error(CONTROL, "(%s) device_output must be an integer", buf);
#  355|   				err = -EINVAL;
#  356|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
alsa-lib-1.2.15.1/src/control/namehint.c:354:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  352|   		if (snd_config_search(cfg, "device_output", &n) >= 0) {
#  353|   			if (snd_config_get_integer(n, &list->device_output) < 0) {
#  354|-> 				snd_error(CONTROL, "(%s) device_output must be an integer", buf);
#  355|   				err = -EINVAL;
#  356|   				goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
alsa-lib-1.2.15.1/src/control/namehint.c:374:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  372|   	/* find, if all parameters have a default, */
#  373|   	/* otherwise filter this definition */
#  374|-> 	eh = snd_lib_log_set_local(&zero_handler);
#  375|   	err = snd_config_search_alias_hooks(config, base, buf, &res);
#  376|   	snd_lib_log_set_local(eh);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
alsa-lib-1.2.15.1/src/control/namehint.c:374:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  372|   	/* find, if all parameters have a default, */
#  373|   	/* otherwise filter this definition */
#  374|-> 	eh = snd_lib_log_set_local(&zero_handler);
#  375|   	err = snd_config_search_alias_hooks(config, base, buf, &res);
#  376|   	snd_lib_log_set_local(eh);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
alsa-lib-1.2.15.1/src/control/namehint.c:376:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  374|   	eh = snd_lib_log_set_local(&zero_handler);
#  375|   	err = snd_config_search_alias_hooks(config, base, buf, &res);
#  376|-> 	snd_lib_log_set_local(eh);
#  377|   	if (err < 0)
#  378|   		goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
alsa-lib-1.2.15.1/src/control/namehint.c:376:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf1'
alsa-lib-1.2.15.1/src/control/namehint.c:585:5: enter_function: entry to 'snd_device_name_hint'
alsa-lib-1.2.15.1/src/control/namehint.c:595:12: branch_false: following 'false' branch (when 'hints' is non-NULL)...
alsa-lib-1.2.15.1/src/control/namehint.c:597:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:598:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:600:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:601:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:603:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:627:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:628:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:629:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/control/namehint.c:630:31: call_function: calling 'add_card' from 'snd_device_name_hint'
#  374|   	eh = snd_lib_log_set_local(&zero_handler);
#  375|   	err = snd_config_search_alias_hooks(config, base, buf, &res);
#  376|-> 	snd_lib_log_set_local(eh);
#  377|   	if (err < 0)
#  378|   		goto __cleanup;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def25]
alsa-lib-1.2.15.1/src/error.c:352:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
alsa-lib-1.2.15.1/src/error.c:351:9: acquire_resource: 'va_start' called here
alsa-lib-1.2.15.1/src/error.c:352:9: throw: if the called function throws an exception...
alsa-lib-1.2.15.1/src/error.c:352:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  350|   	va_list arg;
#  351|   	va_start(arg, fmt);
#  352|-> 	snd_lib_vlog(prio, interface, file, line, function, errcode, fmt, arg);
#  353|   	va_end(arg);
#  354|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def26]
alsa-lib-1.2.15.1/src/error.c:377:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
alsa-lib-1.2.15.1/src/error.c:373:9: acquire_resource: 'va_start' called here
alsa-lib-1.2.15.1/src/error.c:375:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/error.c:377:9: throw: if the called function throws an exception...
alsa-lib-1.2.15.1/src/error.c:377:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  375|   	if (! verbose || ! *verbose)
#  376|   		goto finish;
#  377|-> 	snd_lib_vlog(SND_LOG_ERROR, interface, file, line, function, errcode, fmt, arg);
#  378|   #ifdef ALSA_DEBUG_ASSERT
#  379|   	verbose = getenv("LIBASOUND_DEBUG_ASSERT");

Error: GCC_ANALYZER_WARNING (CWE-404): [#def27]
alsa-lib-1.2.15.1/src/error.c:442:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
alsa-lib-1.2.15.1/src/error.c:441:9: acquire_resource: 'va_start' called here
alsa-lib-1.2.15.1/src/error.c:442:9: throw: if the called function throws an exception...
alsa-lib-1.2.15.1/src/error.c:442:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  440|   	va_list arg;
#  441|   	va_start(arg, fmt);
#  442|-> 	snd_lib_vlog(SND_LOG_ERROR, 0, file, line, function, errcode, fmt, arg);
#  443|   	va_end(arg);
#  444|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:83:13: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:72:12: branch_false: following 'false' branch (when 'lib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:74:16: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:77:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:78:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:80:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:83:13: throw: if '__snd_dlopen' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:83:13: danger: 'xlib' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   81|   	strcat(xlib, "/");
#   82|   	strcat(xlib, lib);
#   83|-> 	h = INTERNAL(snd_dlopen)(xlib, RTLD_NOW, errbuf, sizeof(errbuf));
#   84|   	if (h == NULL) {
#   85|   		snd_error(MIXER, "Unable to open library '%s' (%s)", xlib, errbuf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:72:12: branch_false: following 'false' branch (when 'lib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:74:16: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:77:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:78:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:80:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:84:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:85:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:85:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:85:17: danger: 'xlib' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   83|   	h = INTERNAL(snd_dlopen)(xlib, RTLD_NOW, errbuf, sizeof(errbuf));
#   84|   	if (h == NULL) {
#   85|-> 		snd_error(MIXER, "Unable to open library '%s' (%s)", xlib, errbuf);
#   86|   		free(xlib);
#   87|   		return -ENXIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:92:17: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:72:12: branch_false: following 'false' branch (when 'lib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:74:16: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:77:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:78:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:80:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:84:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:89:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:91:12: branch_true: following 'true' branch (when 'event_func' is NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:92:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:92:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:92:17: danger: 'xlib' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   90|   	event_func = snd_dlsym(h, "alsa_mixer_simple_event", NULL);
#   91|   	if (event_func == NULL) {
#   92|-> 		snd_error(MIXER, "Symbol 'alsa_mixer_simple_event' was not found in '%s'", xlib);
#   93|   		err = -ENXIO;
#   94|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:96:29: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:72:12: branch_false: following 'false' branch (when 'lib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:74:16: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:77:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:78:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:80:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:84:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:89:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:91:12: branch_false: following 'false' branch (when 'event_func' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:96:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:96:29: throw: if 'snd_dlsym' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:96:29: danger: 'xlib' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   94|   	}
#   95|   	if (err == 0) {
#   96|-> 		init_func = snd_dlsym(h, "alsa_mixer_simple_init", NULL);
#   97|   		if (init_func == NULL) {
#   98|   			snd_error(MIXER, "Symbol 'alsa_mixer_simple_init' was not found in '%s'", xlib);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:98:25: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:72:12: branch_false: following 'false' branch (when 'lib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:74:16: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:77:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:78:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:80:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:84:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:89:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:91:12: branch_false: following 'false' branch (when 'event_func' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:96:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:97:20: branch_true: following 'true' branch (when 'init_func' is NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:98:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:98:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:98:25: danger: 'xlib' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#   96|   		init_func = snd_dlsym(h, "alsa_mixer_simple_init", NULL);
#   97|   		if (init_func == NULL) {
#   98|-> 			snd_error(MIXER, "Symbol 'alsa_mixer_simple_init' was not found in '%s'", xlib);
#   99|   			err = -ENXIO;
#  100|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:132:17: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:123:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:124:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:126:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:131:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:132:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:132:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:132:17: danger: 'xlib' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  130|   	h = INTERNAL(snd_dlopen)(xlib, RTLD_NOW|RTLD_GLOBAL, errbuf, sizeof(errbuf));
#  131|   	if (h == NULL) {
#  132|-> 		snd_error(MIXER, "Unable to open library '%s'", xlib);
#  133|   		free(xlib);
#  134|   		return -ENXIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:137:22: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:123:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:124:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:126:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:131:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:136:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:137:22: throw: if 'snd_dlsym' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:137:22: danger: 'xlib' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  135|   	}
#  136|   	priv->dlhandle = h;
#  137|-> 	event_func = snd_dlsym(h, "alsa_mixer_simple_event", NULL);
#  138|   	if (event_func == NULL) {
#  139|   		snd_error(MIXER, "Symbol 'alsa_mixer_simple_event' was not found in '%s'", xlib);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:123:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:124:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:126:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:131:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:136:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:138:12: branch_true: following 'true' branch (when 'event_func' is NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:139:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:139:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:139:17: danger: 'xlib' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  137|   	event_func = snd_dlsym(h, "alsa_mixer_simple_event", NULL);
#  138|   	if (event_func == NULL) {
#  139|-> 		snd_error(MIXER, "Symbol 'alsa_mixer_simple_event' was not found in '%s'", xlib);
#  140|   		err = -ENXIO;
#  141|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:145:25: warning[-Wanalyzer-malloc-leak]: leak of 'xlib'
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:123:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:124:12: branch_false: following 'false' branch (when 'xlib' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:126:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:131:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:136:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:138:12: branch_false: following 'false' branch (when 'event_func' is non-NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:143:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:144:20: branch_true: following 'true' branch (when 'init_func' is NULL)...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:145:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:145:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/mixer/simple_abst.c:145:25: danger: 'xlib' leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  143|   		init_func = snd_dlsym(h, "alsa_mixer_simple_finit", NULL);
#  144|   		if (init_func == NULL) {
#  145|-> 			snd_error(MIXER, "Symbol 'alsa_mixer_simple_finit' was not found in '%s'", xlib);
#  146|   			err = -ENXIO;
#  147|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1732:17: warning[-Wanalyzer-malloc-leak]: leak of 'dmix'
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:2157:5: enter_function: entry to '_snd_pcm_direct_new'
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:2165:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:2166:12: branch_false: following 'false' branch (when 'dmix' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:2169:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:2169:15: call_function: calling 'snd1_pcm_direct_parse_bindings' from '_snd_pcm_direct_new'
# 1730|   		return 0;
# 1731|   	if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) {
# 1732|-> 		snd_error(PCM, "invalid type for bindings");
# 1733|   		return -EINVAL;
# 1734|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1772:25: warning[-Wanalyzer-malloc-leak]: leak of 'bindings'
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1742:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1749:12: branch_false: following 'false' branch (when 'count != 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1751:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1751:12: branch_false: following 'false' branch (when 'count <= 1024')...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1755:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1755:20: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1756:12: branch_false: following 'false' branch (when 'bindings' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1756:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1760:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1761:35: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1767:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1771:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1772:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1772:25: danger: 'bindings' leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
# 1770|   		}
# 1771|   		if (snd_config_get_integer(n, &schannel) < 0) {
# 1772|-> 			snd_error(PCM, "unable to get slave channel (should be integer type) in binding: %s", id);
# 1773|   			free(bindings);
# 1774|   			return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1777:25: warning[-Wanalyzer-malloc-leak]: leak of 'bindings'
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1742:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1749:12: branch_false: following 'false' branch (when 'count != 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1751:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1751:12: branch_false: following 'false' branch (when 'count <= 1024')...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1755:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1755:20: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1756:12: branch_false: following 'false' branch (when 'bindings' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1756:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1760:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1761:35: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1767:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1771:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1771:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1776:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1777:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_direct.c:1777:25: danger: 'bindings' leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
# 1775|   		}
# 1776|   		if (schannel < 0 || schannel >= params->channels) {
# 1777|-> 			snd_error(PCM, "invalid slave channel number %ld in binding to %ld",
# 1778|   				       schannel, cchannel);
# 1779|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:940:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:941:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:951:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:959:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:962:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:964:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:968:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:971:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: danger: '<unknown>' leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
#  970|   				close(ifd);
#  971|   			err = -errno;
#  972|-> 			snd_errornum(PCM, "open %s for reading failed", ifname);
#  973|   			free(file->ifname);
#  974|   			free(file->fname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: warning[-Wanalyzer-malloc-leak]: leak of 'file'
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:940:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:941:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:950:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:951:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:959:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:962:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:964:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:968:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:971:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:972:25: danger: 'file' leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  970|   				close(ifd);
#  971|   			err = -errno;
#  972|-> 			snd_errornum(PCM, "open %s for reading failed", ifname);
#  973|   			free(file->ifname);
#  974|   			free(file->fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ifd'
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:940:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:941:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:951:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:959:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:962:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:964:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: acquire_resource: opened here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:968:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:986:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: throw: if 'close' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: danger: 'ifd' leaks here; was opened at [(11)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/10)
#  986|   	if (err < 0) {
#  987|   		if (file->ifname && file->ifd >= 0)
#  988|-> 			close(file->ifd);
#  989|   		free(file->fname);
#  990|   		free(file->ifname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:940:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:941:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:951:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:959:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:962:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:964:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:968:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:986:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: throw: if 'close' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: danger: '<unknown>' leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
#  986|   	if (err < 0) {
#  987|   		if (file->ifname && file->ifd >= 0)
#  988|-> 			close(file->ifd);
#  989|   		free(file->fname);
#  990|   		free(file->ifname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: warning[-Wanalyzer-malloc-leak]: leak of 'file'
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:940:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:941:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:950:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:951:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:957:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:959:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:962:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:963:32: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:964:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:965:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:968:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:986:12: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:987:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: throw: if 'close' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_file.c:988:25: danger: 'file' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  986|   	if (err < 0) {
#  987|   		if (file->ifname && file->ifd >= 0)
#  988|-> 			close(file->ifd);
#  989|   		free(file->fname);
#  990|   		free(file->ifname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:466:63: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)*meter.buf_size))'
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:453:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:456:27: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:460:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:462:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:462:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:463:22: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:463:22: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:464:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:466:63: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_meter.c:466:63: danger: 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)*meter.buf_size))' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  464|   	if (!meter->buf)
#  465|   		return -ENOMEM;
#  466|-> 	meter->buf_areas = malloc(sizeof(*meter->buf_areas) * slave->channels);
#  467|   	if (!meter->buf_areas) {
#  468|   		free(meter->buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1573:31: warning[-Wanalyzer-malloc-leak]: leak of 'rate'
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1518:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1519:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1522:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1523:12: branch_false: following 'false' branch (when 'rate' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1526:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1536:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: following 'false' branch (when 'converter' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:17: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:19: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1566:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1566:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1567:43: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1573:31: throw: if 'snd_config_get_string' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1573:31: danger: 'rate' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 1571|   			if (strcmp(id, "name") != 0)
# 1572|   				continue;
# 1573|-> 			err = snd_config_get_string(n, &type);
# 1574|   			if (err < 0) {
# 1575|   				snd_pcm_free(pcm);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1582:25: warning[-Wanalyzer-malloc-leak]: leak of 'rate'
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1518:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1519:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1522:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1523:12: branch_false: following 'false' branch (when 'rate' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1526:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1536:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: following 'false' branch (when 'converter' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:17: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:19: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1566:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1581:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1582:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1582:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1582:25: danger: 'rate' leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
# 1580|   		}
# 1581|   		if (!type) {
# 1582|-> 			snd_error(PCM, "No name given for rate converter");
# 1583|   			snd_pcm_free(pcm);
# 1584|   			free(rate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1589:17: warning[-Wanalyzer-malloc-leak]: leak of 'rate'
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1518:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1519:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1522:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1523:12: branch_false: following 'false' branch (when 'rate' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1526:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1536:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: following 'false' branch (when 'converter' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:17: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1564:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1589:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1589:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1589:17: danger: 'rate' leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
# 1587|   		err = rate_open_func(rate, type, converter, 1);
# 1588|   	} else {
# 1589|-> 		snd_error(PCM, "Invalid type for rate converter");
# 1590|   		snd_pcm_free(pcm);
# 1591|   		free(rate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1595:17: warning[-Wanalyzer-malloc-leak]: leak of 'rate'
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1518:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1519:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1522:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1523:12: branch_false: following 'false' branch (when 'rate' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1526:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1536:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: following 'false' branch (when 'converter' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1556:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1594:12: branch_true: following 'true' branch (when 'err < 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1595:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1595:17: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1595:17: danger: 'rate' leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
# 1593|   	}
# 1594|   	if (err < 0) {
# 1595|-> 		snd_error(PCM, "Cannot find rate converter");
# 1596|   		snd_pcm_free(pcm);
# 1597|   		free(rate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1596:17: warning[-Wanalyzer-malloc-leak]: leak of 'rate'
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1518:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1519:12: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1522:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1523:12: branch_false: following 'false' branch (when 'rate' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1526:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1536:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1543:12: branch_false: following 'false' branch (when 'converter' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1552:19: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1554:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1556:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1594:12: branch_true: following 'true' branch (when 'err < 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1595:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1596:17: throw: if 'snd1_pcm_free' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_rate.c:1596:17: danger: 'rate' leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
# 1594|   	if (err < 0) {
# 1595|   		snd_error(PCM, "Cannot find rate converter");
# 1596|-> 		snd_pcm_free(pcm);
# 1597|   		free(rate);
# 1598|   		return -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:821:33: warning[-Wanalyzer-malloc-leak]: leak of 'chmap'
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:785:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:786:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:786:17: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:790:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:793:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:797:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:799:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:808:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:808:28: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:812:37: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:817:28: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:817:28: branch_false: following 'false' branch (when 'found == 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:820:28: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:820:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:824:36: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:808:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:808:28: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:820:28: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:821:33: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:821:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_route.c:821:33: danger: 'chmap' leaks here; was allocated at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
#  819|   
#  820|   			if (chmap->channels >= MAX_CHMAP_CHANNELS) {
#  821|-> 				snd_error(PCM, "Too many channels in ttable chmap");
#  822|   				goto err;
#  823|   			}

Error: COMPILER_WARNING (CWE-252): [#def52]
alsa-lib-1.2.15.1/src/pcm/pcm_share.c: scope_hint: In function 'snd_pcm_share_thread'
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:418:39: warning[-Wunused-result]: ignoring return value of 'read' declared with attribute 'warn_unused_result'
#  418 |                                 (void)read(pfd[0].fd, buf, 1);
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~
#  416|   			if (err > 0 && (pfd[0].revents & POLLIN) != 0) {
#  417|   				char buf[1];
#  418|-> 				(void)read(pfd[0].fd, buf, 1);
#  419|   			}
#  420|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1406:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1407:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1407:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1423:12: branch_false: following 'false' branch (when 'share' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1426:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1427:33: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1428:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1432:53: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1435:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1440:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1441:12: branch_false: following 'false' branch (when 'err >= 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1448:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1464:12: branch_false: following 'false' branch (when 'err >= 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1474:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1475:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1476:40: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1482:12: branch_false: following 'false' branch (when 'slave' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1522:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1524:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1524:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: danger: '<unknown>' leaks here; was allocated at [(7)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/6)
# 1526|   			for (k = 0; k < sh->channels; ++k) {
# 1527|   				if (slave_map[sh->slave_channels[k]]) {
# 1528|-> 					snd_error(PCM, "Slave channel %d is already in use", sh->slave_channels[k]);
# 1529|   					Pthread_mutex_unlock(&slave->mutex);
# 1530|   					close(sd[0]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: warning[-Wanalyzer-malloc-leak]: leak of 'share'
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1406:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1407:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1407:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1422:17: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1423:12: branch_false: following 'false' branch (when 'share' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1426:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1428:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1432:53: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1435:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1440:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1441:12: branch_false: following 'false' branch (when 'err >= 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1448:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1464:12: branch_false: following 'false' branch (when 'err >= 0')...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1474:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1475:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1476:40: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1482:12: branch_false: following 'false' branch (when 'slave' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1522:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1524:17: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1524:17: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/pcm/pcm_share.c:1528:41: danger: 'share' leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
# 1526|   			for (k = 0; k < sh->channels; ++k) {
# 1527|   				if (slave_map[sh->slave_channels[k]]) {
# 1528|-> 					snd_error(PCM, "Slave channel %d is already in use", sh->slave_channels[k]);
# 1529|   					Pthread_mutex_unlock(&slave->mutex);
# 1530|   					close(sd[0]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:776:25: warning[-Wanalyzer-malloc-leak]: leak of 'svol'
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:915:5: enter_function: entry to 'snd_pcm_softvol_open'
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:925:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:926:13: branch_true: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:934:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:935:12: branch_false: following 'false' branch (when 'svol' is non-NULL)...
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:937:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/pcm/pcm_softvol.c:937:15: call_function: calling 'softvol_load_control' from 'snd_pcm_softvol_open'
#  774|   		ctl_card = snd_pcm_info_get_card(&info);
#  775|   		if (ctl_card < 0) {
#  776|-> 			snd_error(PCM, "No card defined for softvol control");
#  777|   			return -EINVAL;
#  778|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:80:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:502:5: enter_function: entry to 'snd_seq_hw_open'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_true: following 'true' branch (when 'name' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:593:29: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:593:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:605:18: call_function: calling 'snd_seq_hw_client_id' from 'snd_seq_hw_open'
#   78|   	int client;
#   79|   	if (ioctl(hw->fd, SNDRV_SEQ_IOCTL_CLIENT_ID, &client) < 0) {
#   80|-> 		snd_errornum(SEQUENCER, "SNDRV_SEQ_IOCTL_CLIENT_ID failed");
#   81|   		return -errno;
#   82|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:80:17: warning[-Wanalyzer-malloc-leak]: leak of 'hw'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:502:5: enter_function: entry to 'snd_seq_hw_open'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:559:14: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: following 'false' branch (when 'name' is NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:594:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:605:18: call_function: calling 'snd_seq_hw_client_id' from 'snd_seq_hw_open'
#   78|   	int client;
#   79|   	if (ioctl(hw->fd, SNDRV_SEQ_IOCTL_CLIENT_ID, &client) < 0) {
#   80|-> 		snd_errornum(SEQUENCER, "SNDRV_SEQ_IOCTL_CLIENT_ID failed");
#   81|   		return -errno;
#   82|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:80:17: warning[-Wanalyzer-malloc-leak]: leak of 'seq'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:502:5: enter_function: entry to 'snd_seq_hw_open'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: following 'false' branch (when 'name' is NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:594:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:605:18: call_function: calling 'snd_seq_hw_client_id' from 'snd_seq_hw_open'
#   78|   	int client;
#   79|   	if (ioctl(hw->fd, SNDRV_SEQ_IOCTL_CLIENT_ID, &client) < 0) {
#   80|-> 		snd_errornum(SEQUENCER, "SNDRV_SEQ_IOCTL_CLIENT_ID failed");
#   81|   		return -errno;
#   82|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_true: following 'true' branch (when 'name' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:593:29: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:593:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:606:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:610:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:624:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: danger: '<unknown>' leaks here; was allocated at [(19)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/18)
#  623|   		run_mode.cpu_mode = sizeof(long);
#  624|   		if (ioctl(fd, SNDRV_SEQ_IOCTL_RUNNING_MODE, &run_mode))
#  625|-> 			snd_warn(SEQUENCER, "running mode cannot be set");
#  626|   	}
#  627|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: warning[-Wanalyzer-malloc-leak]: leak of 'hw'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:559:14: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: following 'false' branch (when 'name' is NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:594:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:606:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:610:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:624:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: danger: 'hw' leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
#  623|   		run_mode.cpu_mode = sizeof(long);
#  624|   		if (ioctl(fd, SNDRV_SEQ_IOCTL_RUNNING_MODE, &run_mode))
#  625|-> 			snd_warn(SEQUENCER, "running mode cannot be set");
#  626|   	}
#  627|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: warning[-Wanalyzer-malloc-leak]: leak of 'seq'
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:511:9: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:539:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:543:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:549:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:560:12: branch_false: following 'false' branch (when 'hw' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:565:15: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:566:12: branch_false: following 'false' branch (when 'seq' is non-NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:571:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:573:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:13: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:582:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:592:12: branch_false: following 'false' branch (when 'name' is NULL)...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:594:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:606:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:610:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:624:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/seq/seq_hw.c:625:25: danger: 'seq' leaks here; was allocated at [(11)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/10)
#  623|   		run_mode.cpu_mode = sizeof(long);
#  624|   		if (ioctl(fd, SNDRV_SEQ_IOCTL_RUNNING_MODE, &run_mode))
#  625|-> 			snd_warn(SEQUENCER, "running mode cannot be set");
#  626|   	}
#  627|   #endif

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
alsa-lib-1.2.15.1/src/topology/data.c:195:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&filename, "r")'
alsa-lib-1.2.15.1/src/topology/data.c:1351:5: enter_function: entry to 'tplg_parse_data'
alsa-lib-1.2.15.1/src/topology/data.c:1361:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1366:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1371:20: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: call_function: calling 'tplg_parse_data_file' from 'tplg_parse_data'
#  193|   	fseek(fp, 0L, SEEK_SET);
#  194|   	if (size <= 0) {
#  195|-> 		snd_error(TOPOLOGY, "invalid data file size %zu", size);
#  196|   		ret = -EINVAL;
#  197|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
alsa-lib-1.2.15.1/src/topology/data.c:195:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&filename, "r")'
alsa-lib-1.2.15.1/src/topology/data.c:1351:5: enter_function: entry to 'tplg_parse_data'
alsa-lib-1.2.15.1/src/topology/data.c:1361:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1366:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1371:20: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: call_function: calling 'tplg_parse_data_file' from 'tplg_parse_data'
#  193|   	fseek(fp, 0L, SEEK_SET);
#  194|   	if (size <= 0) {
#  195|-> 		snd_error(TOPOLOGY, "invalid data file size %zu", size);
#  196|   		ret = -EINVAL;
#  197|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
alsa-lib-1.2.15.1/src/topology/data.c:200:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&filename, "r")'
alsa-lib-1.2.15.1/src/topology/data.c:1351:5: enter_function: entry to 'tplg_parse_data'
alsa-lib-1.2.15.1/src/topology/data.c:1361:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1366:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1371:20: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: call_function: calling 'tplg_parse_data_file' from 'tplg_parse_data'
#  198|   	}
#  199|   	if (size > TPLG_MAX_PRIV_SIZE) {
#  200|-> 		snd_error(TOPOLOGY, "data file too big %zu", size);
#  201|   		ret = -EINVAL;
#  202|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
alsa-lib-1.2.15.1/src/topology/data.c:200:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&filename, "r")'
alsa-lib-1.2.15.1/src/topology/data.c:1351:5: enter_function: entry to 'tplg_parse_data'
alsa-lib-1.2.15.1/src/topology/data.c:1361:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1364:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1366:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1371:20: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1372:31: call_function: calling 'tplg_parse_data_file' from 'tplg_parse_data'
#  198|   	}
#  199|   	if (size > TPLG_MAX_PRIV_SIZE) {
#  200|-> 		snd_error(TOPOLOGY, "data file too big %zu", size);
#  201|   		ret = -EINVAL;
#  202|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
alsa-lib-1.2.15.1/src/topology/data.c:363:25: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
alsa-lib-1.2.15.1/src/topology/data.c:1119:5: enter_function: entry to 'tplg_parse_tuples'
alsa-lib-1.2.15.1/src/topology/data.c:1130:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1135:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1136:12: branch_false: following 'false' branch (when 'tuples' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/data.c:1138:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1140:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1142:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1146:20: branch_false: following 'false' branch (when the strings are non-equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1153:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1154:31: call_function: calling 'parse_tuple_sets' from 'tplg_parse_tuples'
#  361|   			|| (errno != 0 && val == 0)
#  362|   			|| (val > UCHAR_MAX)) {
#  363|-> 			snd_error(TOPOLOGY, "invalid value for uuid");
#  364|   			ret = -EINVAL;
#  365|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
alsa-lib-1.2.15.1/src/topology/data.c:387:25: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
alsa-lib-1.2.15.1/src/topology/data.c:1119:5: enter_function: entry to 'tplg_parse_tuples'
alsa-lib-1.2.15.1/src/topology/data.c:1130:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1135:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1136:12: branch_false: following 'false' branch (when 'tuples' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/data.c:1138:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1140:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1142:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1146:20: branch_false: following 'false' branch (when the strings are non-equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1153:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1154:31: call_function: calling 'parse_tuple_sets' from 'tplg_parse_tuples'
#  385|   			|| (errno != 0 && val == 0)
#  386|   			|| (val > UCHAR_MAX)) {
#  387|-> 			snd_error(TOPOLOGY, "invalid value for uuid");
#  388|   			ret = -EINVAL;
#  389|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
alsa-lib-1.2.15.1/src/topology/data.c:402:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
alsa-lib-1.2.15.1/src/topology/data.c:1119:5: enter_function: entry to 'tplg_parse_tuples'
alsa-lib-1.2.15.1/src/topology/data.c:1130:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1135:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1136:12: branch_false: following 'false' branch (when 'tuples' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/data.c:1138:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1140:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1142:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1146:20: branch_false: following 'false' branch (when the strings are non-equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1153:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1154:31: call_function: calling 'parse_tuple_sets' from 'tplg_parse_tuples'
#  400|   
#  401|   	if (values < 16) {
#  402|-> 		snd_error(TOPOLOGY, "less than 16 integers for uuid");
#  403|   		ret = -EINVAL;
#  404|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def69]
alsa-lib-1.2.15.1/src/topology/data.c:1003:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'id'
alsa-lib-1.2.15.1/src/topology/data.c:1119:5: enter_function: entry to 'tplg_parse_tuples'
alsa-lib-1.2.15.1/src/topology/data.c:1130:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1135:18: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1136:12: branch_false: following 'false' branch (when 'tuples' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/data.c:1138:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1140:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/data.c:1142:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1146:20: branch_false: following 'false' branch (when the strings are non-equal)...
alsa-lib-1.2.15.1/src/topology/data.c:1153:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/data.c:1154:31: call_function: calling 'parse_tuple_sets' from 'tplg_parse_tuples'
# 1001|   		n = snd_config_iterator_entry(i);
# 1002|   		if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
# 1003|-> 			snd_error(TOPOLOGY, "compound type expected for %s, is %d",
# 1004|   					    id, snd_config_get_type(n));
# 1005|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
alsa-lib-1.2.15.1/src/topology/pcm.c:325:25: warning[-Wanalyzer-malloc-leak]: leak of 's'
alsa-lib-1.2.15.1/src/topology/pcm.c:399:5: enter_function: entry to 'tplg_parse_stream_caps'
alsa-lib-1.2.15.1/src/topology/pcm.c:412:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:415:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:421:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:422:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:433:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:436:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:436:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/topology/pcm.c:437:28: branch_false: following 'false' branch (when 's' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/pcm.c:440:31: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:440:31: call_function: calling 'split_format' from 'tplg_parse_stream_caps'
#  323|   		format = snd_pcm_format_value(s);
#  324|   		if (format == SND_PCM_FORMAT_UNKNOWN) {
#  325|-> 			snd_error(TOPOLOGY, "unsupported stream format %s", s);
#  326|   			return -EINVAL;
#  327|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
alsa-lib-1.2.15.1/src/topology/pcm.c:368:25: warning[-Wanalyzer-malloc-leak]: leak of 's'
alsa-lib-1.2.15.1/src/topology/pcm.c:399:5: enter_function: entry to 'tplg_parse_stream_caps'
alsa-lib-1.2.15.1/src/topology/pcm.c:412:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:415:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:421:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:422:21: branch_true: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:451:28: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/topology/pcm.c:454:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:454:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/topology/pcm.c:455:28: branch_false: following 'false' branch (when 's' is non-NULL)...
alsa-lib-1.2.15.1/src/topology/pcm.c:458:31: branch_false: ...to here
alsa-lib-1.2.15.1/src/topology/pcm.c:458:31: call_function: calling 'split_rate' from 'tplg_parse_stream_caps'
#  366|   
#  367|   		if (rate == SND_PCM_RATE_UNKNOWN) {
#  368|-> 			snd_error(TOPOLOGY, "unsupported stream rate %s", s);
#  369|   			return -EINVAL;
#  370|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
alsa-lib-1.2.15.1/src/ucm/main.c:623:25: warning[-Wanalyzer-malloc-leak]: leak of 'file'
alsa-lib-1.2.15.1/src/ucm/main.c:3012:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.15.1/src/ucm/main.c:3021:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  621|   		err = snd_config_search(config, root, &config);
#  622|   		if (err < 0) {
#  623|-> 			snd_error(UCM, "Unable to find subtree '%s'", root);
#  624|   			goto _err;
#  625|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
alsa-lib-1.2.15.1/src/ucm/main.c:630:17: warning[-Wanalyzer-malloc-leak]: leak of 'file'
alsa-lib-1.2.15.1/src/ucm/main.c:3012:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.15.1/src/ucm/main.c:3021:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  628|   	err = snd_output_stdio_open(&out, file, "w+");
#  629|   	if (err < 0) {
#  630|-> 		snd_error(UCM, "unable to open file '%s': %s", file, snd_strerror(err));
#  631|   		goto _err;
#  632|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
alsa-lib-1.2.15.1/src/ucm/main.c:645:17: warning[-Wanalyzer-malloc-leak]: leak of 'file'
alsa-lib-1.2.15.1/src/ucm/main.c:3012:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.15.1/src/ucm/main.c:3021:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  643|   	snd_output_close(out);
#  644|   	if (err < 0) {
#  645|-> 		snd_error(UCM, "unable to save configuration: %s", snd_strerror(err));
#  646|   		goto _err;
#  647|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def75]
alsa-lib-1.2.15.1/src/ucm/main.c:692: error[ctunullpointer]: Null pointer dereference: verb
#  690|   	struct use_case_device *device;
#  691|   
#  692|-> 	snd_trace(UCM, "device sequence '%s/%s': %s", verb->name, name, uc_mgr_enable_str(enable));
#  693|   
#  694|   	if (verb == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
alsa-lib-1.2.15.1/src/ucm/main.c:836:41: warning[-Wanalyzer-malloc-leak]: leak of 'cdev'
alsa-lib-1.2.15.1/src/ucm/main.c:3012:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.15.1/src/ucm/main.c:3021:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  834|   				err = uc_mgr_open_ctl(uc_mgr, &ctl_list, cdev, 1);
#  835|   				if (err < 0) {
#  836|-> 					snd_error(UCM, "unable to open ctl device '%s'", cdev);
#  837|   					goto __fail;
#  838|   				}

Error: CPPCHECK_WARNING (CWE-457): [#def77]
alsa-lib-1.2.15.1/src/ucm/main.c:1079: error[legacyUninitvar]: Uninitialized variable: *&id
# 1077|   		return 0;
# 1078|   
# 1079|-> 	snd_ctl_elem_id_alloca(&id);
# 1080|   	snd_ctl_elem_info_alloca(&info);
# 1081|   	snd_ctl_elem_value_alloca(&value);

Error: CPPCHECK_WARNING (CWE-457): [#def78]
alsa-lib-1.2.15.1/src/ucm/main.c:1080: error[legacyUninitvar]: Uninitialized variable: *&info
# 1078|   
# 1079|   	snd_ctl_elem_id_alloca(&id);
# 1080|-> 	snd_ctl_elem_info_alloca(&info);
# 1081|   	snd_ctl_elem_value_alloca(&value);
# 1082|   

Error: CPPCHECK_WARNING (CWE-457): [#def79]
alsa-lib-1.2.15.1/src/ucm/main.c:1081: error[legacyUninitvar]: Uninitialized variable: *&value
# 1079|   	snd_ctl_elem_id_alloca(&id);
# 1080|   	snd_ctl_elem_info_alloca(&info);
# 1081|-> 	snd_ctl_elem_value_alloca(&value);
# 1082|   
# 1083|   	snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_CARD);

Error: CPPCHECK_WARNING (CWE-457): [#def80]
alsa-lib-1.2.15.1/src/ucm/main.c:1142: error[legacyUninitvar]: Uninitialized variable: *&event
# 1140|   	int err;
# 1141|   
# 1142|-> 	snd_ctl_event_alloca(&event);
# 1143|   
# 1144|   	if (_primary_card)

Error: CPPCHECK_WARNING (CWE-476): [#def81]
alsa-lib-1.2.15.1/src/ucm/main.c:2389: error[ctunullpointer]: Null pointer dereference: identifier
# 2387|   	}
# 2388|   	pthread_mutex_lock(&uc_mgr->mutex);
# 2389|-> 	if (strcmp(identifier, "_verbs") == 0)
# 2390|   		err = get_verb_list(uc_mgr, list);
# 2391|   	else if (strcmp(identifier, "_enadevs") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
alsa-lib-1.2.15.1/src/ucm/parser.c:191:17: warning[-Wanalyzer-malloc-leak]: leak of 'name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2009:12: enter_function: entry to 'parse_modifier_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2014:16: call_function: calling 'parse_compound_check_legacy' from 'parse_modifier_name'
#  189|   {
#  190|   	if (strchr(name, '.')) {
#  191|-> 		snd_error(UCM, "char '.' not allowed in '%s'", name);
#  192|   		return 0;
#  193|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
alsa-lib-1.2.15.1/src/ucm/parser.c:191:17: warning[-Wanalyzer-malloc-leak]: leak of 'use_case_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2812:12: enter_function: entry to 'parse_master_section'
alsa-lib-1.2.15.1/src/ucm/parser.c:2822:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: call_function: calling 'parse_get_safe_name' from 'parse_master_section'
#  189|   {
#  190|   	if (strchr(name, '.')) {
#  191|-> 		snd_error(UCM, "char '.' not allowed in '%s'", name);
#  192|   		return 0;
#  193|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
alsa-lib-1.2.15.1/src/ucm/parser.c:358:17: warning[-Wanalyzer-malloc-leak]: leak of 'use_case_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2812:12: enter_function: entry to 'parse_master_section'
alsa-lib-1.2.15.1/src/ucm/parser.c:2822:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: call_function: calling 'parse_get_safe_name' from 'parse_master_section'
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: return_function: returning to 'parse_master_section' from 'parse_get_safe_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2828:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2834:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2835:15: call_function: calling 'uc_mgr_evaluate_inplace' from 'parse_master_section'
#  356|   
#  357|   	if (snd_config_get_type(d) != SND_CONFIG_TYPE_COMPOUND) {
#  358|-> 		snd_error(UCM, "compound type expected for DefineRegex");
#  359|   		return -EINVAL;
#  360|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
alsa-lib-1.2.15.1/src/ucm/parser.c:363:17: warning[-Wanalyzer-malloc-leak]: leak of 'use_case_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2812:12: enter_function: entry to 'parse_master_section'
alsa-lib-1.2.15.1/src/ucm/parser.c:2822:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: call_function: calling 'parse_get_safe_name' from 'parse_master_section'
alsa-lib-1.2.15.1/src/ucm/parser.c:2827:15: return_function: returning to 'parse_master_section' from 'parse_get_safe_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2828:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2834:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2835:15: call_function: calling 'uc_mgr_evaluate_inplace' from 'parse_master_section'
#  361|   
#  362|   	if (uc_mgr->conf_format < 3) {
#  363|-> 		snd_error(UCM, "DefineRegex is supported in v3+ syntax");
#  364|   		return -EINVAL;
#  365|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
alsa-lib-1.2.15.1/src/ucm/parser.c:1097:17: warning[-Wanalyzer-malloc-leak]: leak of 'val'
alsa-lib-1.2.15.1/src/ucm/parser.c:3076:12: enter_function: entry to 'parse_controls'
alsa-lib-1.2.15.1/src/ucm/parser.c:3080:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3084:15: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3084:15: call_function: calling 'parse_sequence' from 'parse_controls'
# 1095|   	cmpt_seq->device = find_component_dev(uc_mgr, val);
# 1096|   	if (!cmpt_seq->device) {
# 1097|-> 		snd_error(UCM, "Cannot find component device %s", val);
# 1098|   		free(val);
# 1099|   		return -EINVAL;

Error: CPPCHECK_WARNING (CWE-401): [#def87]
alsa-lib-1.2.15.1/src/ucm/parser.c:1736: error[memleak]: Memory leak: device
# 1734|   	device->orig_name = strdup(name);
# 1735|   	if (device->orig_name == NULL)
# 1736|-> 		return -ENOMEM;
# 1737|   
# 1738|   	err = parse_device_fields(uc_mgr, cfg, device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: warning[-Wanalyzer-malloc-leak]: leak of 'norm_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2217:20: branch_true: following 'true' branch (when 'colon' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2218:29: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: danger: 'norm_name' leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
# 2217|   		if (colon) {
# 2218|   			if (colon[1] == '\0' || strchr(colon + 1, ' ')) {
# 2219|-> 				snd_error(UCM, "device descriptor cannot be empty or contain spaces '%s'", orig_name);
# 2220|   				err = -EINVAL;
# 2221|   				goto __error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: warning[-Wanalyzer-malloc-leak]: leak of 'orig_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2217:20: branch_true: following 'true' branch (when 'colon' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2218:29: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:2219:33: danger: 'orig_name' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 2217|   		if (colon) {
# 2218|   			if (colon[1] == '\0' || strchr(colon + 1, ' ')) {
# 2219|-> 				snd_error(UCM, "device descriptor cannot be empty or contain spaces '%s'", orig_name);
# 2220|   				err = -EINVAL;
# 2221|   				goto __error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: warning[-Wanalyzer-malloc-leak]: leak of 'norm_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2192:12: enter_function: entry to 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2217:20: branch_false: following 'false' branch (when 'colon' is NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2238:1: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: call_function: calling 'parse_device_index' from 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: return_function: returning to 'verb_normalize_device_names' from 'parse_device_index'
alsa-lib-1.2.15.1/src/ucm/parser.c:2240:28: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: danger: 'norm_name' leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5)
# 2239|   			err = parse_device_index(&norm_name, &index);
# 2240|   			if (err < 0) {
# 2241|-> 				snd_error(UCM, "cannot parse device name '%s'", orig_name);
# 2242|   				goto __error;
# 2243|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: warning[-Wanalyzer-malloc-leak]: leak of 'orig_name'
alsa-lib-1.2.15.1/src/ucm/parser.c:2192:12: enter_function: entry to 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2200:9: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:36: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2203:29: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:2204:20: branch_false: following 'false' branch (when 'orig_name' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2207:29: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2208:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2213:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2217:20: branch_false: following 'false' branch (when 'colon' is NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:2238:1: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: call_function: calling 'parse_device_index' from 'verb_normalize_device_names'
alsa-lib-1.2.15.1/src/ucm/parser.c:2239:31: return_function: returning to 'verb_normalize_device_names' from 'parse_device_index'
alsa-lib-1.2.15.1/src/ucm/parser.c:2240:28: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:2241:33: danger: 'orig_name' leaks here; was allocated at [(4)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/3)
# 2239|   			err = parse_device_index(&norm_name, &index);
# 2240|   			if (err < 0) {
# 2241|-> 				snd_error(UCM, "cannot parse device name '%s'", orig_name);
# 2242|   				goto __error;
# 2243|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3742:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3749:27: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: throw: if 'snd_strerror' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/14)
# 3737|   			continue;
# 3738|   		if (err < 0) {
# 3739|-> 			snd_error(UCM, "Unable to open '%s': %s", fn, snd_strerror(err));
# 3740|   			goto __err;
# 3741|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: warning[-Wanalyzer-malloc-leak]: leak of 'list'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3721:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: throw: if 'snd_strerror' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3739:25: danger: 'list' leaks here; was allocated at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
# 3737|   			continue;
# 3738|   		if (err < 0) {
# 3739|-> 			snd_error(UCM, "Unable to open '%s': %s", fn, snd_strerror(err));
# 3740|   			goto __err;
# 3741|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3742:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3749:27: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: danger: '<unknown>' leaks here; was allocated at [(16)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/15)
# 3775|   		err = snd_config_search(cfg, "Syntax", &c);
# 3776|   		if (err < 0) {
# 3777|-> 			snd_error(UCM, "Syntax field not found in %s", d_name);
# 3778|   			snd_config_delete(cfg);
# 3779|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: warning[-Wanalyzer-malloc-leak]: leak of 'list'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3721:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3777:25: danger: 'list' leaks here; was allocated at [(6)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/5)
# 3775|   		err = snd_config_search(cfg, "Syntax", &c);
# 3776|   		if (err < 0) {
# 3777|-> 			snd_error(UCM, "Syntax field not found in %s", d_name);
# 3778|   			snd_config_delete(cfg);
# 3779|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3742:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3749:27: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3781:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3782:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: danger: '<unknown>' leaks here; was allocated at [(16)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/15)
# 3781|   		err = snd_config_get_integer(c, &l);
# 3782|   		if (err < 0) {
# 3783|-> 			snd_error(UCM, "Syntax field is invalid in %s", d_name);
# 3784|   			snd_config_delete(cfg);
# 3785|   			goto __err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: warning[-Wanalyzer-malloc-leak]: leak of 'list'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3721:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3781:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3782:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3783:25: danger: 'list' leaks here; was allocated at [(6)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/5)
# 3781|   		err = snd_config_get_integer(c, &l);
# 3782|   		if (err < 0) {
# 3783|-> 			snd_error(UCM, "Syntax field is invalid in %s", d_name);
# 3784|   			snd_config_delete(cfg);
# 3785|   			goto __err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3728:16: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3729:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3734:17: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3738:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3742:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3749:27: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3750:20: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3781:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3782:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3787:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3787:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: danger: '<unknown>' leaks here; was allocated at [(16)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/15)
# 3786|   		}
# 3787|   		if (l < 2 || l > SYNTAX_VERSION_MAX) {
# 3788|-> 			snd_error(UCM, "Incompatible syntax %d in %s", l, d_name);
# 3789|   			snd_config_delete(cfg);
# 3790|   			goto __err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: warning[-Wanalyzer-malloc-leak]: leak of 'list'
alsa-lib-1.2.15.1/src/ucm/parser.c:3655:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3672:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3674:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3699:12: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3706:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3721:16: acquire_memory: allocated here
alsa-lib-1.2.15.1/src/ucm/parser.c:3722:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.15.1/src/ucm/parser.c:3727:9: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3730:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3732:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3759:21: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3761:34: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.15.1/src/ucm/parser.c:3764:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.15.1/src/ucm/parser.c:3766:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3772:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3773:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3775:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3776:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3781:23: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3782:20: branch_false: following 'false' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3787:21: branch_false: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3787:20: branch_true: following 'true' branch...
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: throw: if 'snd_lib_log' throws an exception...
alsa-lib-1.2.15.1/src/ucm/parser.c:3788:25: danger: 'list' leaks here; was allocated at [(6)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/5)
# 3786|   		}
# 3787|   		if (l < 2 || l > SYNTAX_VERSION_MAX) {
# 3788|-> 			snd_error(UCM, "Incompatible syntax %d in %s", l, d_name);
# 3789|   			snd_config_delete(cfg);
# 3790|   			goto __err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
alsa-lib-1.2.15.1/src/ucm/ucm_local.h:323:26: warning[-Wanalyzer-malloc-leak]: leak of 'cdev'
alsa-lib-1.2.15.1/src/ucm/main.c:3012:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.15.1/src/ucm/main.c:3021:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: branch_true: ...to here
alsa-lib-1.2.15.1/src/ucm/main.c:3022:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  321|   {
#  322|   	return uc_mgr && uc_mgr->local_config &&
#  323|-> 			 snd_config_iterator_first(uc_mgr->local_config) !=
#  324|   			 snd_config_iterator_end(uc_mgr->local_config);
#  325|   }

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-5.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namealsa-lib-1.2.14-4.fc43
diffbase-store-results-to/tmp/tmpi1p6xus5/alsa-lib-1.2.14-4.fc43.tar.xz
diffbase-time-created2026-01-08 15:28:18
diffbase-time-finished2026-01-08 15:31:47
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpi1p6xus5/alsa-lib-1.2.14-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpi1p6xus5/alsa-lib-1.2.14-4.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-5.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-namealsa-lib-1.2.15.1-1.fc44
store-results-to/tmp/tmpsxydj7l3/alsa-lib-1.2.15.1-1.fc44.tar.xz
time-created2026-01-08 15:32:24
time-finished2026-01-08 15:35:30
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpsxydj7l3/alsa-lib-1.2.15.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsxydj7l3/alsa-lib-1.2.15.1-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9