iproute-6.17.0-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
iproute2-6.17.0/bridge/monitor.c:142:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
iproute2-6.17.0/bridge/monitor.c:89:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/bridge/monitor.c:90:21: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:90:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/bridge/monitor.c:93:28: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:89:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/bridge/monitor.c:90:21: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:90:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/bridge/monitor.c:91:25: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:91:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/bridge/monitor.c:92:25: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:89:16: branch_false: following ‘false’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/bridge/monitor.c:122:12: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:133:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/bridge/monitor.c:137:22: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:137:22: acquire_resource: opened here
iproute2-6.17.0/bridge/monitor.c:138:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/bridge/monitor.c:142:23: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:142:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/bridge/monitor.c:142:23: danger: ‘fopen(file, "r")’ leaks here; was opened at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  140|   			exit(-1);
#  141|   		}
#  142|-> 		err = rtnl_from_file(fp, accept_msg, stdout);
#  143|   		fclose(fp);
#  144|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
iproute2-6.17.0/bridge/monitor.c:142:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
iproute2-6.17.0/bridge/monitor.c:89:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/bridge/monitor.c:90:21: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:90:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/bridge/monitor.c:93:28: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:89:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/bridge/monitor.c:90:21: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:90:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/bridge/monitor.c:91:25: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:91:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/bridge/monitor.c:92:25: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:89:16: branch_false: following ‘false’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/bridge/monitor.c:122:12: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:133:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/bridge/monitor.c:137:22: branch_true: ...to here
iproute2-6.17.0/bridge/monitor.c:137:22: acquire_memory: allocated here
iproute2-6.17.0/bridge/monitor.c:138:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/bridge/monitor.c:142:23: branch_false: ...to here
iproute2-6.17.0/bridge/monitor.c:142:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/bridge/monitor.c:142:23: danger: ‘fopen(file, "r")’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  140|   			exit(-1);
#  141|   		}
#  142|-> 		err = rtnl_from_file(fp, accept_msg, stdout);
#  143|   		fclose(fp);
#  144|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
iproute2-6.17.0/dcb/dcb.c:19:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   17|   	dcb->buf = malloc(MNL_SOCKET_BUFFER_SIZE);
#   18|   	if (dcb->buf == NULL) {
#   19|-> 		perror("Netlink buffer allocation");
#   20|   		return -1;
#   21|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
iproute2-6.17.0/dcb/dcb.c:23:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   21|   	}
#   22|   
#   23|-> 	dcb->nl = mnlu_socket_open(NETLINK_ROUTE);
#   24|   	if (dcb->nl == NULL) {
#   25|   		perror("Open netlink socket");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
iproute2-6.17.0/dcb/dcb.c:23:19: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   21|   	}
#   22|   
#   23|-> 	dcb->nl = mnlu_socket_open(NETLINK_ROUTE);
#   24|   	if (dcb->nl == NULL) {
#   25|   		perror("Open netlink socket");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
iproute2-6.17.0/dcb/dcb.c:25:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   23|   	dcb->nl = mnlu_socket_open(NETLINK_ROUTE);
#   24|   	if (dcb->nl == NULL) {
#   25|-> 		perror("Open netlink socket");
#   26|   		goto err_socket_open;
#   27|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
iproute2-6.17.0/dcb/dcb.c:25:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   23|   	dcb->nl = mnlu_socket_open(NETLINK_ROUTE);
#   24|   	if (dcb->nl == NULL) {
#   25|-> 		perror("Open netlink socket");
#   26|   		goto err_socket_open;
#   27|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
iproute2-6.17.0/dcb/dcb.c:29:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   27|   	}
#   28|   
#   29|-> 	new_json_obj_plain(dcb->json_output);
#   30|   	return 0;
#   31|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
iproute2-6.17.0/dcb/dcb.c:29:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
#   27|   	}
#   28|   
#   29|-> 	new_json_obj_plain(dcb->json_output);
#   30|   	return 0;
#   31|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
iproute2-6.17.0/dcb/dcb.c:481:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  479|   static int dcb_cmd(struct dcb *dcb, int argc, char **argv)
#  480|   {
#  481|-> 	if (!argc || matches(*argv, "help") == 0) {
#  482|   		dcb_help();
#  483|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
iproute2-6.17.0/dcb/dcb.c:481:22: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  479|   static int dcb_cmd(struct dcb *dcb, int argc, char **argv)
#  480|   {
#  481|-> 	if (!argc || matches(*argv, "help") == 0) {
#  482|   		dcb_help();
#  483|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
iproute2-6.17.0/dcb/dcb.c:484:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  482|   		dcb_help();
#  483|   		return 0;
#  484|-> 	} else if (matches(*argv, "app") == 0) {
#  485|   		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
iproute2-6.17.0/dcb/dcb.c:484:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  482|   		dcb_help();
#  483|   		return 0;
#  484|-> 	} else if (matches(*argv, "app") == 0) {
#  485|   		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
iproute2-6.17.0/dcb/dcb.c:485:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  483|   		return 0;
#  484|   	} else if (matches(*argv, "app") == 0) {
#  485|-> 		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {
#  487|   		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
iproute2-6.17.0/dcb/dcb.c:485:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  483|   		return 0;
#  484|   	} else if (matches(*argv, "app") == 0) {
#  485|-> 		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {
#  487|   		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
iproute2-6.17.0/dcb/dcb.c:487:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  485|   		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {
#  487|-> 		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
iproute2-6.17.0/dcb/dcb.c:487:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  485|   		return dcb_cmd_app(dcb, argc - 1, argv + 1);
#  486|   	} else if (strcmp(*argv, "apptrust") == 0) {
#  487|-> 		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
iproute2-6.17.0/dcb/dcb.c:489:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  487|   		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|-> 		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
iproute2-6.17.0/dcb/dcb.c:489:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  487|   		return dcb_cmd_apptrust(dcb, argc - 1, argv + 1);
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|-> 		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
iproute2-6.17.0/dcb/dcb.c:490:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|-> 	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|   	} else if (matches(*argv, "dcbx") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
iproute2-6.17.0/dcb/dcb.c:490:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  488|   	} else if (strcmp(*argv, "rewr") == 0) {
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|-> 	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|   	} else if (matches(*argv, "dcbx") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
iproute2-6.17.0/dcb/dcb.c:491:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|-> 		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|   	} else if (matches(*argv, "dcbx") == 0) {
#  493|   		return dcb_cmd_dcbx(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
iproute2-6.17.0/dcb/dcb.c:491:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  489|   		return dcb_cmd_rewr(dcb, argc - 1, argv + 1);
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|-> 		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|   	} else if (matches(*argv, "dcbx") == 0) {
#  493|   		return dcb_cmd_dcbx(dcb, argc - 1, argv + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
iproute2-6.17.0/dcb/dcb.c:492:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|-> 	} else if (matches(*argv, "dcbx") == 0) {
#  493|   		return dcb_cmd_dcbx(dcb, argc - 1, argv + 1);
#  494|   	} else if (matches(*argv, "ets") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
iproute2-6.17.0/dcb/dcb.c:492:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/dcb/dcb.c:593:14: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:596:15: call_function: calling ‘dcb_init’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:596:15: return_function: returning to ‘main’ from ‘dcb_init’
iproute2-6.17.0/dcb/dcb.c:597:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:602:12: branch_false: following ‘false’ branch (when ‘batch_file’ is NULL)...
iproute2-6.17.0/dcb/dcb.c:605:23: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:605:23: call_function: calling ‘dcb_cmd’ from ‘main’
#  490|   	} else if (matches(*argv, "buffer") == 0) {
#  491|   		return dcb_cmd_buffer(dcb, argc - 1, argv + 1);
#  492|-> 	} else if (matches(*argv, "dcbx") == 0) {
#  493|   		return dcb_cmd_dcbx(dcb, argc - 1, argv + 1);
#  494|   	} else if (matches(*argv, "ets") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
iproute2-6.17.0/dcb/dcb.c:573:29: warning[-Wanalyzer-malloc-leak]: leak of ‘dcb’
iproute2-6.17.0/dcb/dcb.c:518:5: enter_function: entry to ‘main’
iproute2-6.17.0/dcb/dcb.c:540:15: call_function: inlined call to ‘dcb_alloc’ from ‘main’
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: following ‘false’ branch (when ‘dcb’ is non-NULL)...
iproute2-6.17.0/dcb/dcb.c:541:12: branch_false: ...to here
iproute2-6.17.0/dcb/dcb.c:546:16: branch_true: following ‘true’ branch (when ‘opt >= 0’)...
iproute2-6.17.0/dcb/dcb.c:549:17: branch_true: ...to here
iproute2-6.17.0/dcb/dcb.c:573:29: throw: if ‘netns_switch’ throws an exception...
iproute2-6.17.0/dcb/dcb.c:573:29: danger: ‘dcb’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  571|   			break;
#  572|   		case 'n':
#  573|-> 			if (netns_switch(optarg)) {
#  574|   				ret = EXIT_FAILURE;
#  575|   				goto dcb_free;

Error: CPPCHECK_WARNING (CWE-476): [#def27]
iproute2-6.17.0/devlink/devlink.c:2892: error[ctunullpointer]: Null pointer dereference: dl
# 2890|   	snprintf(buf, sizeof(buf), "%s/%s", bus_name, dev_name);
# 2891|   
# 2892|-> 	if (dl->json_output) {
# 2893|   		if (array) {
# 2894|   			if (should_arr_last_handle_end(dl, bus_name, dev_name))

Error: CPPCHECK_WARNING (CWE-457): [#def28]
iproute2-6.17.0/devlink/devlink.c:3627: error[uninitvar]: Uninitialized variables: param_value_attr.nla_len, param_value_attr.nla_type
# 3625|   				 nla_param[DEVLINK_ATTR_PARAM_VALUES_LIST]) {
# 3626|   		pr_out_entry_start(dl);
# 3627|-> 		pr_out_param_value(dl, nla_name, nla_type, param_value_attr);
# 3628|   		pr_out_entry_end(dl);
# 3629|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def29]
iproute2-6.17.0/devlink/devlink.c:7633: error[uninitvar]: Uninitialized variables: nla_field.nla_len, nla_field.nla_type
# 7631|   
# 7632|   	mnl_attr_for_each_nested(nla_field, nla_fields) {
# 7633|-> 		err = dpipe_header_field_get(nla_field, &fields[count]);
# 7634|   		if (err)
# 7635|   			return err;

Error: CPPCHECK_WARNING (CWE-457): [#def30]
iproute2-6.17.0/devlink/devlink.c:7699: error[uninitvar]: Uninitialized variables: nla_header.nla_len, nla_header.nla_type
# 7697|   
# 7698|   	mnl_attr_for_each_nested(nla_header, nla_headers) {
# 7699|-> 		err = dpipe_header_get(ctx, nla_header);
# 7700|   		if (err)
# 7701|   			return err;

Error: CPPCHECK_WARNING (CWE-457): [#def31]
iproute2-6.17.0/devlink/devlink.c:7858: error[uninitvar]: Uninitialized variables: nla_action.nla_len, nla_action.nla_type
# 7856|   	mnl_attr_for_each_nested(nla_action, nla_actions) {
# 7857|   		pr_out_entry_start(ctx->dl);
# 7858|-> 		if (dpipe_action_parse(&action, nla_action))
# 7859|   			goto err_action_parse;
# 7860|   		pr_out_dpipe_action(&action, ctx);

Error: CPPCHECK_WARNING (CWE-457): [#def32]
iproute2-6.17.0/devlink/devlink.c:7943: error[uninitvar]: Uninitialized variables: nla_match.nla_len, nla_match.nla_type
# 7941|   	mnl_attr_for_each_nested(nla_match, nla_matches) {
# 7942|   		pr_out_entry_start(ctx->dl);
# 7943|-> 		if (dpipe_match_parse(&match, nla_match))
# 7944|   			goto err_match_parse;
# 7945|   		pr_out_dpipe_match(&match, ctx);

Error: CPPCHECK_WARNING (CWE-457): [#def33]
iproute2-6.17.0/devlink/devlink.c:8096: error[uninitvar]: Uninitialized variables: nla_table.nla_len, nla_table.nla_type
# 8094|   		if (ctx->print_tables)
# 8095|   			pr_out_handle_start_arr(ctx->dl, tb);
# 8096|-> 		if (dpipe_table_show(ctx, nla_table))
# 8097|   			goto err_table_show;
# 8098|   		if (ctx->print_tables)

Error: CPPCHECK_WARNING (CWE-457): [#def34]
iproute2-6.17.0/devlink/devlink.c:8455: error[uninitvar]: Uninitialized variables: nla_action_value.nla_len, nla_action_value.nla_type
# 8453|   
# 8454|   	mnl_attr_for_each_nested(nla_action_value, nla_action_values) {
# 8455|-> 		if (dpipe_entry_action_value_show(ctx, nla_action_value))
# 8456|   			return -EINVAL;
# 8457|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def35]
iproute2-6.17.0/devlink/devlink.c:8468: error[uninitvar]: Uninitialized variables: nla_match_value.nla_len, nla_match_value.nla_type
# 8466|   
# 8467|   	mnl_attr_for_each_nested(nla_match_value, nla_match_values) {
# 8468|-> 		if (dpipe_entry_match_value_show(ctx, nla_match_value))
# 8469|   			return -EINVAL;
# 8470|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def36]
iproute2-6.17.0/devlink/devlink.c:8526: error[uninitvar]: Uninitialized variables: nla_entry.nla_len, nla_entry.nla_type
# 8524|   	mnl_attr_for_each_nested(nla_entry, nla_entries) {
# 8525|   		pr_out_handle_start_arr(ctx->dl, tb);
# 8526|-> 		if (dpipe_entry_show(ctx, nla_entry))
# 8527|   			goto err_entry_show;
# 8528|   		pr_out_handle_end(ctx->dl);

Error: CPPCHECK_WARNING (CWE-457): [#def37]
iproute2-6.17.0/devlink/devlink.c:9927: error[uninitvar]: Uninitialized variables: attr_metadata.nla_len, attr_metadata.nla_type
# 9925|   		check_indent_newline(dl);
# 9926|   		print_string(PRINT_ANY, NULL, "%s",
# 9927|-> 			     trap_metadata_name(attr_metadata));
# 9928|   	}
# 9929|   	pr_out_array_end(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
iproute2-6.17.0/include/json_print.h:64:1: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:797:9: call_function: inlined call to ‘print_int’ from ‘print_pedit’
#   62|    * characters printed otherwise (as calculated by printf(3)).
#   63|    */
#   64|-> _PRINT_FUNC(int, int)
#   65|   _PRINT_FUNC(s64, int64_t)
#   66|   _PRINT_FUNC(bool, bool)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
iproute2-6.17.0/include/json_print.h:67:1: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#   65|   _PRINT_FUNC(s64, int64_t)
#   66|   _PRINT_FUNC(bool, bool)
#   67|-> _PRINT_FUNC(on_off, bool)
#   68|   _PRINT_FUNC(null, const char*)
#   69|   _PRINT_FUNC(string, const char*)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
iproute2-6.17.0/include/json_print.h:69:1: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#   67|   _PRINT_FUNC(on_off, bool)
#   68|   _PRINT_FUNC(null, const char*)
#   69|-> _PRINT_FUNC(string, const char*)
#   70|   _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
iproute2-6.17.0/include/json_print.h:69:1: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:808:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:810:38: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:813:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: following ‘true’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:819:33: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:828:31: call_function: calling ‘print_pedit_location’ from ‘print_pedit’
#   67|   _PRINT_FUNC(on_off, bool)
#   68|   _PRINT_FUNC(null, const char*)
#   69|-> _PRINT_FUNC(string, const char*)
#   70|   _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
iproute2-6.17.0/include/json_print.h:69:1: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
iproute2-6.17.0/tc/f_flower.c:2806:1: enter_function: entry to ‘flower_print_enc_parts’
iproute2-6.17.0/tc/f_flower.c:2812:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2813:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2817:21: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2827:9: call_function: inlined call to ‘print_string’ from ‘flower_print_enc_parts’
#   67|   _PRINT_FUNC(on_off, bool)
#   68|   _PRINT_FUNC(null, const char*)
#   69|-> _PRINT_FUNC(string, const char*)
#   70|   _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
iproute2-6.17.0/include/json_print.h:70:1: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:795:9: call_function: inlined call to ‘print_uint’ from ‘print_pedit’
#   68|   _PRINT_FUNC(null, const char*)
#   69|   _PRINT_FUNC(string, const char*)
#   70|-> _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)
#   72|   _PRINT_FUNC(u64, uint64_t)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
iproute2-6.17.0/include/json_print.h:70:1: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
#   68|   _PRINT_FUNC(null, const char*)
#   69|   _PRINT_FUNC(string, const char*)
#   70|-> _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)
#   72|   _PRINT_FUNC(u64, uint64_t)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
iproute2-6.17.0/include/json_print.h:70:1: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
#   68|   _PRINT_FUNC(null, const char*)
#   69|   _PRINT_FUNC(string, const char*)
#   70|-> _PRINT_FUNC(uint, unsigned int)
#   71|   _PRINT_FUNC(size, __u32)
#   72|   _PRINT_FUNC(u64, uint64_t)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
iproute2-6.17.0/include/json_print.h:75:1: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:784:23: call_function: calling ‘pedit_keys_ex_getattr’ from ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:784:23: return_function: returning to ‘print_pedit’ from ‘pedit_keys_ex_getattr’
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:808:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:810:38: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:813:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: following ‘true’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:819:33: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:829:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:837:25: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:841:25: call_function: inlined call to ‘print_hex’ from ‘print_pedit’
#   73|   _PRINT_FUNC(hhu, unsigned char)
#   74|   _PRINT_FUNC(hu, unsigned short)
#   75|-> _PRINT_FUNC(hex, unsigned int)
#   76|   _PRINT_FUNC(0xhex, unsigned long long)
#   77|   _PRINT_FUNC(luint, unsigned long)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
iproute2-6.17.0/ip/ipaddress.c:1795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘linfo.head’
iproute2-6.17.0/ip/ipaddress.c:2693:5: enter_function: entry to ‘do_ipaddr’
iproute2-6.17.0/ip/ipaddress.c:2695:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/ip/ipaddress.c:2696:24: branch_true: ...to here
iproute2-6.17.0/ip/ipaddress.c:2696:24: call_function: calling ‘ipaddr_list_flush_or_save’ from ‘do_ipaddr’
# 1793|   	lchain->tail = h;
# 1794|   
# 1795|-> 	ll_remember_index(n, NULL);
# 1796|   	return 0;
# 1797|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
iproute2-6.17.0/ip/ipaddress.c:2124:13: warning[-Wanalyzer-malloc-leak]: leak of ‘linfo.head’
iproute2-6.17.0/ip/ipaddress.c:2693:5: enter_function: entry to ‘do_ipaddr’
iproute2-6.17.0/ip/ipaddress.c:2695:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/ip/ipaddress.c:2696:24: branch_true: ...to here
iproute2-6.17.0/ip/ipaddress.c:2696:24: call_function: calling ‘ipaddr_list_flush_or_save’ from ‘do_ipaddr’
# 2122|   static int ip_addr_list(struct nlmsg_chain *ainfo)
# 2123|   {
# 2124|-> 	if (rtnl_addrdump_req(&rth, filter.family, ipaddr_dump_filter) < 0) {
# 2125|   		perror("Cannot send dump request");
# 2126|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
iproute2-6.17.0/ip/ipaddress.c:2125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘linfo.head’
iproute2-6.17.0/ip/ipaddress.c:2693:5: enter_function: entry to ‘do_ipaddr’
iproute2-6.17.0/ip/ipaddress.c:2695:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/ip/ipaddress.c:2696:24: branch_true: ...to here
iproute2-6.17.0/ip/ipaddress.c:2696:24: call_function: calling ‘ipaddr_list_flush_or_save’ from ‘do_ipaddr’
# 2123|   {
# 2124|   	if (rtnl_addrdump_req(&rth, filter.family, ipaddr_dump_filter) < 0) {
# 2125|-> 		perror("Cannot send dump request");
# 2126|   		return 1;
# 2127|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
iproute2-6.17.0/ip/ipaddress.c:2129:13: warning[-Wanalyzer-malloc-leak]: leak of ‘linfo.head’
iproute2-6.17.0/ip/ipaddress.c:2693:5: enter_function: entry to ‘do_ipaddr’
iproute2-6.17.0/ip/ipaddress.c:2695:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/ip/ipaddress.c:2696:24: branch_true: ...to here
iproute2-6.17.0/ip/ipaddress.c:2696:24: call_function: calling ‘ipaddr_list_flush_or_save’ from ‘do_ipaddr’
# 2127|   	}
# 2128|   
# 2129|-> 	if (rtnl_dump_filter(&rth, store_nlmsg, ainfo) < 0) {
# 2130|   		fprintf(stderr, "Dump terminated\n");
# 2131|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
iproute2-6.17.0/ip/ipaddress.c:2345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘l’
iproute2-6.17.0/ip/ipaddress.c:2693:5: enter_function: entry to ‘do_ipaddr’
iproute2-6.17.0/ip/ipaddress.c:2695:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
iproute2-6.17.0/ip/ipaddress.c:2696:24: branch_true: ...to here
iproute2-6.17.0/ip/ipaddress.c:2696:24: call_function: calling ‘ipaddr_list_flush_or_save’ from ‘do_ipaddr’
# 2343|   		int res = 0;
# 2344|   
# 2345|-> 		open_json_object(NULL);
# 2346|   		if (brief || !no_link)
# 2347|   			res = print_linkinfo(n, stdout);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
iproute2-6.17.0/ip/iplink.c:669:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘netns’
iproute2-6.17.0/ip/iplink.c:1512:5: enter_function: entry to ‘do_iplink’
iproute2-6.17.0/ip/iplink.c:1514:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/iplink.c:1517:13: branch_false: ...to here
iproute2-6.17.0/ip/iplink.c:1517:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/ip/iplink.c:1518:24: branch_true: ...to here
iproute2-6.17.0/ip/iplink.c:1518:24: call_function: calling ‘iplink_modify’ from ‘do_iplink’
#  667|   				invarg("Invalid \"netns\" value\n", *argv);
#  668|   
#  669|-> 			open_fds_add(netns);
#  670|   			addattr_l(&req->n, sizeof(*req), IFLA_NET_NS_FD,
#  671|   				  &netns, 4);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
iproute2-6.17.0/ip/ipnetns.c:88:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/ns/net", 0)’
iproute2-6.17.0/ip/ipnetns.c:391:12: enter_function: entry to ‘netns_list_id’
iproute2-6.17.0/ip/ipnetns.c:395:14: call_function: calling ‘ipnetns_have_nsid’ from ‘netns_list_id’
#   86|   		}
#   87|   
#   88|-> 		addattr32(&req.n, 1024, NETNSA_FD, fd);
#   89|   
#   90|   		if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) {

Error: CPPCHECK_WARNING (CWE-401): [#def54]
iproute2-6.17.0/ip/ipnetns.c:185: error[memleak]: Memory leak: c
#  183|   	hlist_add_head(&c->name_hash, &name_head[h]);
#  184|   
#  185|-> 	return 0;
#  186|   }
#  187|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
iproute2-6.17.0/ip/ipnetns.c:221:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/run/netns")’
iproute2-6.17.0/ip/ipnetns.c:217:15: acquire_memory: allocated here
iproute2-6.17.0/ip/ipnetns.c:218:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:218:12: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:221:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/ip/ipnetns.c:221:25: danger: ‘opendir("/var/run/netns")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  219|   		return;
#  220|   
#  221|-> 	while ((entry = readdir(dir)) != NULL) {
#  222|   		if (strcmp(entry->d_name, ".") == 0)
#  223|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
iproute2-6.17.0/ip/ipnetns.c:248:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/run/netns")’
iproute2-6.17.0/ip/ipnetns.c:241:12: branch_false: following ‘false’ branch (when ‘nsid >= 0’)...
iproute2-6.17.0/ip/ipnetns.c:244:15: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:244:15: acquire_memory: allocated here
iproute2-6.17.0/ip/ipnetns.c:245:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:245:12: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:248:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/ip/ipnetns.c:248:25: danger: ‘opendir("/var/run/netns")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  246|   		return -ENOENT;
#  247|   
#  248|-> 	while ((entry = readdir(dir)) != NULL) {
#  249|   		if (strcmp(entry->d_name, ".") == 0)
#  250|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
iproute2-6.17.0/ip/ipnetns.c:458:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/run/netns")’
iproute2-6.17.0/ip/ipnetns.c:454:15: acquire_memory: allocated here
iproute2-6.17.0/ip/ipnetns.c:455:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:458:9: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:458:9: throw: if ‘new_json_obj’ throws an exception...
iproute2-6.17.0/ip/ipnetns.c:458:9: danger: ‘opendir("/var/run/netns")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  456|   		return 0;
#  457|   
#  458|-> 	new_json_obj(json);
#  459|   	while ((entry = readdir(dir)) != NULL) {
#  460|   		if (strcmp(entry->d_name, ".") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
iproute2-6.17.0/ip/ipnetns.c:574:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/")’
iproute2-6.17.0/ip/ipnetns.c:546:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/ipnetns.c:550:12: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:550:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
iproute2-6.17.0/ip/ipnetns.c:555:9: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:558:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:563:13: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:563:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:568:15: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:568:15: acquire_memory: allocated here
iproute2-6.17.0/ip/ipnetns.c:569:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:569:12: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:574:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/ip/ipnetns.c:574:25: danger: ‘opendir("/proc/")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  572|   		goto out;
#  573|   	}
#  574|-> 	while ((entry = readdir(dir))) {
#  575|   		char pid_net_path[PATH_MAX];
#  576|   		struct stat st;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
iproute2-6.17.0/ip/ipnetns.c:633:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/run/netns")’
iproute2-6.17.0/ip/ipnetns.c:610:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:615:13: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:615:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:620:15: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:620:15: acquire_memory: allocated here
iproute2-6.17.0/ip/ipnetns.c:621:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnetns.c:621:12: branch_false: ...to here
iproute2-6.17.0/ip/ipnetns.c:633:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/ip/ipnetns.c:633:25: danger: ‘opendir("/var/run/netns")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  631|   	}
#  632|   
#  633|-> 	while ((entry = readdir(dir))) {
#  634|   		char name_path[PATH_MAX];
#  635|   		struct stat st;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
iproute2-6.17.0/ip/ipnexthop.c:339:17: warning[-Wanalyzer-malloc-leak]: leak of ‘nhe.nh_grp_stats’
iproute2-6.17.0/ip/ipnexthop.c:1443:5: enter_function: entry to ‘do_ipnh’
iproute2-6.17.0/ip/ipnexthop.c:1445:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/ipnexthop.c:1448:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1448:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnexthop.c:1451:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1451:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnexthop.c:1454:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1454:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipnexthop.c:1457:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1460:24: call_function: calling ‘ipnh_list_flush’ from ‘do_ipnh’
#  337|   		struct rtattr *rta;
#  338|   
#  339|-> 		parse_rtattr_nested(tb, NHA_GROUP_STATS_ENTRY_MAX, pos);
#  340|   
#  341|   		if (tb[NHA_GROUP_STATS_ENTRY_ID]) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
iproute2-6.17.0/ip/ipnexthop.c:923:21: warning[-Wanalyzer-malloc-leak]: leak of ‘grps’
iproute2-6.17.0/ip/ipnexthop.c:1443:5: enter_function: entry to ‘do_ipnh’
iproute2-6.17.0/ip/ipnexthop.c:1445:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/ipnexthop.c:1448:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1448:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/ip/ipnexthop.c:1449:24: branch_true: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1449:24: call_function: calling ‘ipnh_modify’ from ‘do_ipnh’
#  921|   			*wsep = '\0';
#  922|   
#  923|-> 		if (get_unsigned(&grps[i].id, argv, 0))
#  924|   			goto out;
#  925|   		if (wsep) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
iproute2-6.17.0/ip/ipnexthop.c:940:15: warning[-Wanalyzer-malloc-leak]: leak of ‘grps’
iproute2-6.17.0/ip/ipnexthop.c:1443:5: enter_function: entry to ‘do_ipnh’
iproute2-6.17.0/ip/ipnexthop.c:1445:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/ipnexthop.c:1448:14: branch_false: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1448:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/ip/ipnexthop.c:1449:24: branch_true: ...to here
iproute2-6.17.0/ip/ipnexthop.c:1449:24: call_function: calling ‘ipnh_modify’ from ‘do_ipnh’
#  938|   	}
#  939|   
#  940|-> 	err = addattr_l(n, maxlen, NHA_GROUP, grps, count * sizeof(*grps));
#  941|   out:
#  942|   	free(grps);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
iproute2-6.17.0/ip/iproute_lwtunnel.c:902:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_srh(&segbuf, (int)hmac,  encap != 0)’
iproute2-6.17.0/ip/iproute_lwtunnel.c:948:12: enter_function: entry to ‘parse_encap_seg6’
iproute2-6.17.0/ip/iproute_lwtunnel.c:990:15: call_function: calling ‘parse_srh’ from ‘parse_encap_seg6’
iproute2-6.17.0/ip/iproute_lwtunnel.c:990:15: return_function: returning to ‘parse_encap_seg6’ from ‘parse_srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:991:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/iproute_lwtunnel.c:993:19: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:996:12: branch_false: following ‘false’ branch (when ‘tuninfo’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:998:9: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1004:13: throw: if ‘rta_addattr_l’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:902:21: danger: ‘parse_srh(&segbuf, (int)hmac,  encap != 0)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  900|   
#  901|   	s = segbuf;
#  902|-> 	for (i = 0; *s; *s++ == ',' ? i++ : *s);
#  903|   	nsegs = i + 1;
#  904|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
iproute2-6.17.0/ip/iproute_lwtunnel.c:931:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:913:15: acquire_memory: allocated here
iproute2-6.17.0/ip/iproute_lwtunnel.c:914:12: branch_false: following ‘false’ branch (when ‘srh’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:917:9: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:928:39: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:931:17: branch_true: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:931:17: throw: if ‘get_addr’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:931:17: danger: ‘srh’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  929|   		inet_prefix addr;
#  930|   
#  931|-> 		get_addr(&addr, s, AF_INET6);
#  932|   		memcpy(&srh->segments[i], addr.data, sizeof(struct in6_addr));
#  933|   		i--;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
iproute2-6.17.0/ip/iproute_lwtunnel.c:1004:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tuninfo’
iproute2-6.17.0/ip/iproute_lwtunnel.c:948:12: enter_function: entry to ‘parse_encap_seg6’
iproute2-6.17.0/ip/iproute_lwtunnel.c:990:15: call_function: calling ‘parse_srh’ from ‘parse_encap_seg6’
iproute2-6.17.0/ip/iproute_lwtunnel.c:990:15: return_function: returning to ‘parse_encap_seg6’ from ‘parse_srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:991:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/iproute_lwtunnel.c:993:19: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:995:19: acquire_memory: allocated here
iproute2-6.17.0/ip/iproute_lwtunnel.c:996:12: branch_false: following ‘false’ branch (when ‘tuninfo’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:998:9: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1004:13: throw: if ‘rta_addattr_l’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1004:13: danger: ‘tuninfo’ leaks here; was allocated at [(14)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/13)
# 1002|   	memcpy(tuninfo->srh, srh, srhlen);
# 1003|   
# 1004|-> 	if (rta_addattr_l(rta, len, SEG6_IPTUNNEL_SRH, tuninfo,
# 1005|   			  sizeof(*tuninfo) + srhlen))
# 1006|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
iproute2-6.17.0/ip/iproute_lwtunnel.c:1028:21: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_rpl_srh(&segbuf)’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1052:12: enter_function: entry to ‘parse_encap_rpl’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1076:15: call_function: calling ‘parse_rpl_srh’ from ‘parse_encap_rpl’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1076:15: return_function: returning to ‘parse_encap_rpl’ from ‘parse_rpl_srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1079:13: throw: if ‘rta_addattr_l’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1028:21: danger: ‘parse_rpl_srh(&segbuf)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
# 1026|   
# 1027|   	s = segbuf;
# 1028|-> 	for (i = 0; *s; *s++ == ',' ? i++ : *s);
# 1029|   	nsegs = i + 1;
# 1030|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
iproute2-6.17.0/ip/iproute_lwtunnel.c:1044:17: warning[-Wanalyzer-malloc-leak]: leak of ‘srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1033:15: acquire_memory: allocated here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1034:12: branch_false: following ‘false’ branch (when ‘srh’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1037:23: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1041:39: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1044:17: branch_true: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1044:17: throw: if ‘get_addr’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1044:17: danger: ‘srh’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1042|   		inet_prefix addr;
# 1043|   
# 1044|-> 		get_addr(&addr, s, AF_INET6);
# 1045|   		memcpy(&srh->rpl_segaddr[i], addr.data, sizeof(struct in6_addr));
# 1046|   		i--;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def68]
iproute2-6.17.0/ip/iproute_lwtunnel.c:1077:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘parse_rpl_srh(&segbuf)’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1052:12: enter_function: entry to ‘parse_encap_rpl’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1076:15: call_function: calling ‘parse_rpl_srh’ from ‘parse_encap_rpl’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1076:15: return_function: returning to ‘parse_encap_rpl’ from ‘parse_rpl_srh’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1077:19: danger: dereference of NULL ‘parse_rpl_srh(&segbuf)’
# 1075|   
# 1076|   	srh = parse_rpl_srh(segbuf);
# 1077|-> 	srhlen = (srh->hdrlen + 1) << 3;
# 1078|   
# 1079|   	if (rta_addattr_l(rta, len, RPL_IPTUNNEL_SRH, srh,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
iproute2-6.17.0/ip/iproute_lwtunnel.c:1655:29: warning[-Wanalyzer-malloc-leak]: leak of ‘opts’
iproute2-6.17.0/ip/iproute_lwtunnel.c:1617:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1618:17: branch_true: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1617:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1618:17: branch_true: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1617:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1618:17: branch_true: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1652:32: acquire_memory: allocated here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1653:28: branch_false: following ‘false’ branch (when ‘opts’ is non-NULL)...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1655:29: branch_false: ...to here
iproute2-6.17.0/ip/iproute_lwtunnel.c:1655:29: throw: if ‘hex2mem’ throws an exception...
iproute2-6.17.0/ip/iproute_lwtunnel.c:1655:29: danger: ‘opts’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 1653|   			if (!opts)
# 1654|   				return -1;
# 1655|-> 			if (hex2mem(token, opts, token_len / 2) < 0) {
# 1656|   				free(opts);
# 1657|   				return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
iproute2-6.17.0/ip/ipstats.c:97:23: warning[-Wanalyzer-malloc-leak]: leak of ‘show_attrs.tbs[0]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#   95|   
#   96|   	if (group == 0)
#   97|-> 		err = parse_rtattr(attrs->tbs[group], ifla_max,
#   98|   				   IFLA_STATS_RTA(attrs->ifsm), attrs->len);
#   99|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
iproute2-6.17.0/ip/ipstats.c:100:23: warning[-Wanalyzer-malloc-leak]: leak of ‘show_attrs.tbs[4]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#   98|   				   IFLA_STATS_RTA(attrs->ifsm), attrs->len);
#   99|   	else
#  100|-> 		err = parse_rtattr_nested(attrs->tbs[group], ifla_max,
#  101|   					  attrs->tbs[0][group]);
#  102|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
iproute2-6.17.0/ip/ipstats.c:311:15: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsio’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#  309|   	int v;
#  310|   
#  311|-> 	err = parse_rtattr_nested(tb, IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, at);
#  312|   	if (err)
#  313|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
iproute2-6.17.0/ip/ipstats.c:398:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#  396|   
#  397|   	print_string(PRINT_FP, NULL, "    %s", name);
#  398|-> 	open_json_object(name);
#  399|   	__ipstats_show_hw_s_info_one(hwsio);
#  400|   	close_json_object();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
iproute2-6.17.0/ip/ipstats.c:400:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#  398|   	open_json_object(name);
#  399|   	__ipstats_show_hw_s_info_one(hwsio);
#  400|-> 	close_json_object();
#  401|   }
#  402|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
iproute2-6.17.0/ip/ipstats.c:412:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#  410|   		return err;
#  411|   
#  412|-> 	open_json_object("info");
#  413|   	ipstats_show_hw_s_info_one(&hwsi, IPSTATS_HW_S_INFO_IDX_L3_STATS);
#  414|   	close_json_object();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
iproute2-6.17.0/ip/ipstats.c:414:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hwsi.infos[err]’
iproute2-6.17.0/ip/ipstats.c:1342:5: enter_function: entry to ‘ipstats_print’
iproute2-6.17.0/ip/ipstats.c:1354:14: call_function: calling ‘ipstats_process_ifsm’ from ‘ipstats_print’
#  412|   	open_json_object("info");
#  413|   	ipstats_show_hw_s_info_one(&hwsi, IPSTATS_HW_S_INFO_IDX_L3_STATS);
#  414|-> 	close_json_object();
#  415|   
#  416|   	ipstats_fini_hw_s_info(&hwsi);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
iproute2-6.17.0/ip/ipstats.c:1053:9: warning[-Wanalyzer-malloc-leak]: leak of ‘enabled.enabled’
iproute2-6.17.0/ip/ipstats.c:1316:5: enter_function: entry to ‘do_ipstats’
iproute2-6.17.0/ip/ipstats.c:1320:12: branch_true: following ‘true’ branch (when ‘argc == 0’)...
iproute2-6.17.0/ip/ipstats.c:1321:22: branch_true: ...to here
iproute2-6.17.0/ip/ipstats.c:1321:22: call_function: calling ‘ipstats_show’ from ‘do_ipstats’
# 1051|   		goto out;
# 1052|   
# 1053|-> 	qsort(enabled->enabled, enabled->nenabled, sizeof(*enabled->enabled),
# 1054|   	      ipstats_comp_enabled);
# 1055|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
iproute2-6.17.0/ip/ipstats.c:1053:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_enabled.enabled’
iproute2-6.17.0/ip/ipstats.c:1316:5: enter_function: entry to ‘do_ipstats’
iproute2-6.17.0/ip/ipstats.c:1320:12: branch_true: following ‘true’ branch (when ‘argc == 0’)...
iproute2-6.17.0/ip/ipstats.c:1321:22: branch_true: ...to here
iproute2-6.17.0/ip/ipstats.c:1321:22: call_function: calling ‘ipstats_show’ from ‘do_ipstats’
# 1051|   		goto out;
# 1052|   
# 1053|-> 	qsort(enabled->enabled, enabled->nenabled, sizeof(*enabled->enabled),
# 1054|   	      ipstats_comp_enabled);
# 1055|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
iproute2-6.17.0/ip/ipvrf.c:132:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "r")’
iproute2-6.17.0/ip/ipvrf.c:207:12: enter_function: entry to ‘ipvrf_pids’
iproute2-6.17.0/ip/ipvrf.c:213:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
iproute2-6.17.0/ip/ipvrf.c:218:9: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:219:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:224:15: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:228:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:228:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:231:15: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:231:15: call_function: calling ‘recurse_dir’ from ‘ipvrf_pids’
#  130|   			*nl = '\0';
#  131|   
#  132|-> 		if (get_command_name(buf, comm, sizeof(comm)))
#  133|   			strcpy(comm, "<terminated?>");
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
iproute2-6.17.0/ip/ipvrf.c:132:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "r")’
iproute2-6.17.0/ip/ipvrf.c:207:12: enter_function: entry to ‘ipvrf_pids’
iproute2-6.17.0/ip/ipvrf.c:213:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
iproute2-6.17.0/ip/ipvrf.c:218:9: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:219:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:224:15: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:228:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:228:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:231:15: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:231:15: call_function: calling ‘recurse_dir’ from ‘ipvrf_pids’
#  130|   			*nl = '\0';
#  131|   
#  132|-> 		if (get_command_name(buf, comm, sizeof(comm)))
#  133|   			strcpy(comm, "<terminated?>");
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
iproute2-6.17.0/ip/ipvrf.c:154:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(base_path)’
iproute2-6.17.0/ip/ipvrf.c:150:13: acquire_memory: allocated here
iproute2-6.17.0/ip/ipvrf.c:151:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:151:12: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:154:22: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/ip/ipvrf.c:154:22: danger: ‘opendir(base_path)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  152|   		return -1;
#  153|   
#  154|-> 	while ((de = readdir(d)) != NULL) {
#  155|   		if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
#  156|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
iproute2-6.17.0/ip/ipvrf.c:255:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 65536)’
iproute2-6.17.0/ip/ipvrf.c:260:12: enter_function: entry to ‘vrf_configure_cgroup’
iproute2-6.17.0/ip/ipvrf.c:264:17: acquire_resource: opened here
iproute2-6.17.0/ip/ipvrf.c:265:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:276:19: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:276:19: call_function: calling ‘prog_load’ from ‘vrf_configure_cgroup’
#  253|   	};
#  254|   
#  255|-> 	return bpf_program_load(BPF_PROG_TYPE_CGROUP_SOCK, prog, sizeof(prog),
#  256|   				"GPL", bpf_log_buf, sizeof(bpf_log_buf),
#  257|   				false);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
iproute2-6.17.0/ip/ipvrf.c:278:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 65536)’
iproute2-6.17.0/ip/ipvrf.c:264:17: acquire_resource: opened here
iproute2-6.17.0/ip/ipvrf.c:265:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:276:19: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:277:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/ip/ipvrf.c:279:34: branch_true: ...to here
iproute2-6.17.0/ip/ipvrf.c:278:17: danger: ‘open(path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  276|   	prog_fd = prog_load(ifindex);
#  277|   	if (prog_fd < 0) {
#  278|-> 		fprintf(stderr, "Failed to load BPF prog: '%s'\n%s",
#  279|   			strerror(errno), bpf_log_buf);
#  280|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
iproute2-6.17.0/ip/ipvrf.c:288:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 65536)’
iproute2-6.17.0/ip/ipvrf.c:264:17: acquire_resource: opened here
iproute2-6.17.0/ip/ipvrf.c:265:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:276:19: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:277:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:288:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:288:13: throw: if ‘bpf_program_attach’ throws an exception...
iproute2-6.17.0/ip/ipvrf.c:288:13: danger: ‘open(path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  286|   	}
#  287|   
#  288|-> 	if (bpf_program_attach(prog_fd, cg_fd, BPF_CGROUP_INET_SOCK_CREATE)) {
#  289|   		fprintf(stderr, "Failed to attach prog to cgroup: '%s'\n",
#  290|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
iproute2-6.17.0/ip/ipvrf.c:426:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 1026)’
iproute2-6.17.0/ip/ipvrf.c:367:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:371:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:371:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:374:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:374:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:381:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:401:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:406:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:406:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:411:12: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:418:14: acquire_resource: opened here
iproute2-6.17.0/ip/ipvrf.c:419:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:425:9: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:426:13: throw: if ‘write’ throws an exception...
iproute2-6.17.0/ip/ipvrf.c:426:13: danger: ‘open(&path, 1026)’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  424|   
#  425|   	snprintf(pid, sizeof(pid), "%d", getpid());
#  426|-> 	if (write(fd, pid, strlen(pid)) < 0) {
#  427|   		fprintf(stderr, "Failed to join cgroup\n");
#  428|   		goto out2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
iproute2-6.17.0/ip/ipvrf.c:433:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 1026)’
iproute2-6.17.0/ip/ipvrf.c:367:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:371:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:371:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:374:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:374:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:381:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:401:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:406:13: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:406:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:411:12: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:418:14: acquire_resource: opened here
iproute2-6.17.0/ip/ipvrf.c:419:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/ipvrf.c:425:9: branch_false: ...to here
iproute2-6.17.0/ip/ipvrf.c:433:9: danger: ‘open(&path, 1026)’ leaks here; was opened at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  431|   	rc = 0;
#  432|   out2:
#  433|-> 	close(fd);
#  434|   out:
#  435|   	free(mnt);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
iproute2-6.17.0/ip/rtmon.c:36:40: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_resource: opened here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:166:9: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:168:13: throw: if ‘rtnl_dump_filter_nc’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:36:40: danger: ‘fopen(file, "w")’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   34|   	n1->nlmsg_len = NLMSG_LENGTH(4*2);
#   35|   	gettimeofday(&tv, NULL);
#   36|-> 	((__u32 *)NLMSG_DATA(n1))[0] = tv.tv_sec;
#   37|   	((__u32 *)NLMSG_DATA(n1))[1] = tv.tv_usec;
#   38|   	fwrite((void *)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
iproute2-6.17.0/ip/rtmon.c:36:40: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_memory: allocated here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:166:9: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:168:13: throw: if ‘rtnl_dump_filter_nc’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:36:40: danger: ‘fopen(file, "w")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#   34|   	n1->nlmsg_len = NLMSG_LENGTH(4*2);
#   35|   	gettimeofday(&tv, NULL);
#   36|-> 	((__u32 *)NLMSG_DATA(n1))[0] = tv.tv_sec;
#   37|   	((__u32 *)NLMSG_DATA(n1))[1] = tv.tv_usec;
#   38|   	fwrite((void *)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
iproute2-6.17.0/ip/rtmon.c:158:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_resource: opened here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: danger: ‘fopen(file, "w")’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  156|   	}
#  157|   
#  158|-> 	if (rtnl_open(&rth, groups) < 0)
#  159|   		exit(1);
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
iproute2-6.17.0/ip/rtmon.c:158:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_memory: allocated here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: danger: ‘fopen(file, "w")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  156|   	}
#  157|   
#  158|-> 	if (rtnl_open(&rth, groups) < 0)
#  159|   		exit(1);
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
iproute2-6.17.0/ip/rtmon.c:158:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_resource: opened here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:13: throw: if ‘rtnl_open’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:158:13: danger: ‘fopen(file, "w")’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  156|   	}
#  157|   
#  158|-> 	if (rtnl_open(&rth, groups) < 0)
#  159|   		exit(1);
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
iproute2-6.17.0/ip/rtmon.c:158:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_memory: allocated here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:13: throw: if ‘rtnl_open’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:158:13: danger: ‘fopen(file, "w")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  156|   	}
#  157|   
#  158|-> 	if (rtnl_open(&rth, groups) < 0)
#  159|   		exit(1);
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def93]
iproute2-6.17.0/ip/rtmon.c:161:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_resource: opened here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:12: danger: ‘fopen(file, "w")’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  159|   		exit(1);
#  160|   
#  161|-> 	if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
#  162|   		perror("Cannot send dump request");
#  163|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
iproute2-6.17.0/ip/rtmon.c:161:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_memory: allocated here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:12: danger: ‘fopen(file, "w")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  159|   		exit(1);
#  160|   
#  161|-> 	if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
#  162|   		perror("Cannot send dump request");
#  163|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
iproute2-6.17.0/ip/rtmon.c:161:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_resource: opened here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:13: throw: if ‘rtnl_linkdump_req’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:161:13: danger: ‘fopen(file, "w")’ leaks here; was opened at [(11)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/10)
#  159|   		exit(1);
#  160|   
#  161|-> 	if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
#  162|   		perror("Cannot send dump request");
#  163|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
iproute2-6.17.0/ip/rtmon.c:161:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
iproute2-6.17.0/ip/rtmon.c:80:16: branch_true: following ‘true’ branch (when ‘argc > 1’)...
iproute2-6.17.0/ip/rtmon.c:81:21: branch_true: ...to here
iproute2-6.17.0/ip/rtmon.c:104:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:107:28: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:110:28: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/ip/rtmon.c:112:25: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:80:16: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:133:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/rtmon.c:137:12: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:152:14: acquire_memory: allocated here
iproute2-6.17.0/ip/rtmon.c:153:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:158:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:158:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/rtmon.c:161:13: branch_false: ...to here
iproute2-6.17.0/ip/rtmon.c:161:13: throw: if ‘rtnl_linkdump_req’ throws an exception...
iproute2-6.17.0/ip/rtmon.c:161:13: danger: ‘fopen(file, "w")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/10)
#  159|   		exit(1);
#  160|   
#  161|-> 	if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
#  162|   		perror("Cannot send dump request");
#  163|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
iproute2-6.17.0/ip/xfrm_monitor.c:340:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/xfrm_monitor.c:341:21: branch_true: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:342:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/ip/xfrm_monitor.c:343:25: branch_false: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:390:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/xfrm_monitor.c:394:22: branch_true: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:394:22: acquire_resource: opened here
iproute2-6.17.0/ip/xfrm_monitor.c:395:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: branch_false: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: danger: ‘fopen(file, "r")’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  397|   			exit(-1);
#  398|   		}
#  399|-> 		err = rtnl_from_file(fp, xfrm_accept_msg, stdout);
#  400|   		fclose(fp);
#  401|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
iproute2-6.17.0/ip/xfrm_monitor.c:340:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/ip/xfrm_monitor.c:341:21: branch_true: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:342:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/ip/xfrm_monitor.c:343:25: branch_false: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:390:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/ip/xfrm_monitor.c:394:22: branch_true: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:394:22: acquire_memory: allocated here
iproute2-6.17.0/ip/xfrm_monitor.c:395:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: branch_false: ...to here
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/ip/xfrm_monitor.c:399:23: danger: ‘fopen(file, "r")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  397|   			exit(-1);
#  398|   		}
#  399|-> 		err = rtnl_from_file(fp, xfrm_accept_msg, stdout);
#  400|   		fclose(fp);
#  401|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
iproute2-6.17.0/lib/fs.c:159:26: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:127:7: enter_function: entry to ‘get_cgroup2_id’
iproute2-6.17.0/lib/fs.c:139:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
iproute2-6.17.0/lib/fs.c:144:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:145:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:145:12: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:150:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:155:23: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:155:23: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_id’
iproute2-6.17.0/lib/fs.c:155:23: return_function: returning to ‘get_cgroup2_id’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:156:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:159:26: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:159:26: throw: if ‘open’ throws an exception...
iproute2-6.17.0/lib/fs.c:159:26: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#  157|   			goto out;
#  158|   
#  159|-> 		mnt_fd = open(mnt, O_RDONLY);
#  160|   		if (mnt_fd < 0) {
#  161|   			fprintf(stderr, "Failed to open cgroup2 mount\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
iproute2-6.17.0/lib/fs.c:214:18: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:214:18: throw: if ‘open’ throws an exception...
iproute2-6.17.0/lib/fs.c:214:18: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
#  212|   		goto out;
#  213|   
#  214|-> 	mnt_fd = open(mnt, O_RDONLY);
#  215|   	if (mnt_fd < 0) {
#  216|   		fprintf(stderr, "Failed to open cgroup2 mount\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
iproute2-6.17.0/lib/fs.c:224:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(find_cgroup2_mount(0), 0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:214:18: acquire_resource: opened here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:224:14: throw: if ‘open_by_handle_at’ throws an exception...
iproute2-6.17.0/lib/fs.c:224:14: danger: ‘open(find_cgroup2_mount(0), 0)’ leaks here; was opened at [(18)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/17)
#  222|   	memcpy(fhp->f_handle, cg_id.bytes, sizeof(__u64));
#  223|   
#  224|-> 	fd = open_by_handle_at(mnt_fd, fhp, 0);
#  225|   	if (fd < 0) {
#  226|   		if (errno != ESTALE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
iproute2-6.17.0/lib/fs.c:224:14: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:224:14: throw: if ‘open_by_handle_at’ throws an exception...
iproute2-6.17.0/lib/fs.c:224:14: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
#  222|   	memcpy(fhp->f_handle, cg_id.bytes, sizeof(__u64));
#  223|   
#  224|-> 	fd = open_by_handle_at(mnt_fd, fhp, 0);
#  225|   	if (fd < 0) {
#  226|   		if (errno != ESTALE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
iproute2-6.17.0/lib/fs.c:234:17: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:250:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:251:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:251:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:234:17: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/11)
#  232|   	link_len = readlink(fd_path, link_buf, sizeof(link_buf) - 1);
#  233|   	if (link_len < 0) {
#  234|-> 		fprintf(stderr,
#  235|   			"Failed to read value of symbolic link %s\n",
#  236|   			fd_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
iproute2-6.17.0/lib/fs.c:244:24: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:231:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:233:12: branch_false: following ‘false’ branch (when ‘link_len >= 0’)...
iproute2-6.17.0/lib/fs.c:239:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:241:12: branch_false: following ‘false’ branch (when ‘full == 0’)...
iproute2-6.17.0/lib/fs.c:244:42: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:245:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
iproute2-6.17.0/lib/fs.c:249:1: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:250:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:251:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:251:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:244:24: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/11)
#  242|   		path = strdup(link_buf);
#  243|   	else
#  244|-> 		path = strdup(link_buf + strlen(mnt));
#  245|   	if (!path)
#  246|   		fprintf(stderr,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
iproute2-6.17.0/lib/fs.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘find_cgroup2_mount(0)’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:231:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:233:12: branch_false: following ‘false’ branch (when ‘link_len >= 0’)...
iproute2-6.17.0/lib/fs.c:239:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:241:12: branch_true: following ‘true’ branch (when ‘full != 0’)...
iproute2-6.17.0/lib/fs.c:242:24: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:245:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
iproute2-6.17.0/lib/fs.c:249:1: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:250:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:251:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:251:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:251:17: danger: ‘find_cgroup2_mount(0)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
#  249|   out:
#  250|   	if (fd >= 0)
#  251|-> 		close(fd);
#  252|   	if (mnt_fd >= 0)
#  253|   		close(mnt_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
iproute2-6.17.0/lib/fs.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:231:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:233:12: branch_false: following ‘false’ branch (when ‘link_len >= 0’)...
iproute2-6.17.0/lib/fs.c:239:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:241:12: branch_true: following ‘true’ branch (when ‘full != 0’)...
iproute2-6.17.0/lib/fs.c:242:24: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:242:24: acquire_memory: allocated here
iproute2-6.17.0/lib/fs.c:245:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
iproute2-6.17.0/lib/fs.c:249:1: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:250:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:251:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:251:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:251:17: danger: ‘path’ leaks here; was allocated at [(26)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/25)
#  249|   out:
#  250|   	if (fd >= 0)
#  251|-> 		close(fd);
#  252|   	if (mnt_fd >= 0)
#  253|   		close(mnt_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
iproute2-6.17.0/lib/fs.c:253:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mnt’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:252:12: branch_true: following ‘true’ branch (when ‘mnt_fd >= 0’)...
iproute2-6.17.0/lib/fs.c:253:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:253:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:253:17: danger: ‘mnt’ leaks here; was allocated at [(12)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/11)
#  251|   		close(fd);
#  252|   	if (mnt_fd >= 0)
#  253|-> 		close(mnt_fd);
#  254|   	free(mnt);
#  255|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
iproute2-6.17.0/lib/fs.c:253:17: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
iproute2-6.17.0/lib/fs.c:190:7: enter_function: entry to ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:205:12: branch_false: following ‘false’ branch (when ‘id != 0’)...
iproute2-6.17.0/lib/fs.c:210:15: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:210:15: call_function: calling ‘find_cgroup2_mount’ from ‘get_cgroup2_path’
iproute2-6.17.0/lib/fs.c:210:15: return_function: returning to ‘get_cgroup2_path’ from ‘find_cgroup2_mount’
iproute2-6.17.0/lib/fs.c:211:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:214:18: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:215:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:220:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:225:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/fs.c:231:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:233:12: branch_false: following ‘false’ branch (when ‘link_len >= 0’)...
iproute2-6.17.0/lib/fs.c:239:9: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:241:12: branch_true: following ‘true’ branch (when ‘full != 0’)...
iproute2-6.17.0/lib/fs.c:242:24: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:242:24: acquire_memory: allocated here
iproute2-6.17.0/lib/fs.c:245:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
iproute2-6.17.0/lib/fs.c:249:1: branch_false: ...to here
iproute2-6.17.0/lib/fs.c:250:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/lib/fs.c:251:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:252:12: branch_true: following ‘true’ branch (when ‘mnt_fd >= 0’)...
iproute2-6.17.0/lib/fs.c:253:17: branch_true: ...to here
iproute2-6.17.0/lib/fs.c:253:17: throw: if ‘close’ throws an exception...
iproute2-6.17.0/lib/fs.c:253:17: danger: ‘path’ leaks here; was allocated at [(26)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/25)
#  251|   		close(fd);
#  252|   	if (mnt_fd >= 0)
#  253|-> 		close(mnt_fd);
#  254|   	free(mnt);
#  255|   

Error: CPPCHECK_WARNING (CWE-476): [#def109]
iproute2-6.17.0/lib/fs.c:271: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: delim
#  269|   
#  270|   	/* skip '/' -- it had better exist */
#  271|-> 	if (*delim == '/')
#  272|   		delim++;
#  273|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
iproute2-6.17.0/lib/libnetlink.c:804:23: warning[-Wanalyzer-malloc-leak]: leak of ‘iov.iov_base’
iproute2-6.17.0/lib/libnetlink.c:972:5: enter_function: entry to ‘rtnl_dump_filter_errhndlr_nc’
iproute2-6.17.0/lib/libnetlink.c:988:16: call_function: calling ‘rtnl_dump_filter_l’ from ‘rtnl_dump_filter_errhndlr_nc’
#  802|   
#  803|   	do {
#  804|-> 		len = recvmsg(fd, msg, flags);
#  805|   	} while (len < 0 && (errno == EINTR || errno == EAGAIN));
#  806|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
iproute2-6.17.0/lib/libnetlink.c:804:23: warning[-Wanalyzer-malloc-leak]: leak of ‘riov.iov_base’
iproute2-6.17.0/lib/libnetlink.c:1002:12: enter_function: entry to ‘__rtnl_talk_iov’
iproute2-6.17.0/lib/libnetlink.c:1027:12: branch_false: following ‘false’ branch (when ‘status >= 0’)...
iproute2-6.17.0/lib/libnetlink.c:1033:9: branch_false: ...to here
iproute2-6.17.0/lib/libnetlink.c:1038:26: call_function: calling ‘rtnl_recvmsg’ from ‘__rtnl_talk_iov’
#  802|   
#  803|   	do {
#  804|-> 		len = recvmsg(fd, msg, flags);
#  805|   	} while (len < 0 && (errno == EINTR || errno == EAGAIN));
#  806|   

Error: COMPILER_WARNING (CWE-704): [#def112]
iproute2-6.17.0/lib/ll_addr.c: scope_hint: In function ‘ll_addr_a2n’
iproute2-6.17.0/lib/ll_addr.c:69:36: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   69 |                         char *cp = strchr(arg, ':');
#      |                                    ^~~~~~
#   67|   		for (i = 0; i < len; i++) {
#   68|   			int temp;
#   69|-> 			char *cp = strchr(arg, ':');
#   70|   			if (cp) {
#   71|   				*cp = 0;

Error: COMPILER_WARNING (CWE-704): [#def113]
iproute2-6.17.0/lib/ll_addr.c:69:36: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   67|   		for (i = 0; i < len; i++) {
#   68|   			int temp;
#   69|-> 			char *cp = strchr(arg, ':');
#   70|   			if (cp) {
#   71|   				*cp = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
iproute2-6.17.0/lib/ll_map.c:58:16: warning[-Wanalyzer-malloc-leak]: leak of ‘im’
iproute2-6.17.0/lib/ll_map.c:353:10: enter_function: entry to ‘ll_name_to_index’
iproute2-6.17.0/lib/ll_map.c:358:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
iproute2-6.17.0/lib/ll_map.c:361:14: branch_false: ...to here
iproute2-6.17.0/lib/ll_map.c:362:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/ll_map.c:365:15: branch_false: ...to here
iproute2-6.17.0/lib/ll_map.c:365:15: call_function: calling ‘ll_link_get’ from ‘ll_name_to_index’
#   56|   		hash = ((hash << 5) + hash) + *str++; /* hash * 33 + c */
#   57|   
#   58|-> 	return hash;
#   59|   }
#   60|   

Error: CPPCHECK_WARNING (CWE-457): [#def115]
iproute2-6.17.0/lib/mnl_utils.c:310: error[uninitvar]: Uninitialized variable: attr->nla_type
#  308|   
#  309|   	mnl_attr_for_each_nested(attr, op_policy_nest) {
#  310|-> 		if (ctx->cmd != (attr->nla_type & ~NLA_F_NESTED))
#  311|   			continue;
#  312|   		err = mnl_attr_parse_nested(attr, ctrl_policy_attrs_cb, tb);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
iproute2-6.17.0/lib/namespace.c:32:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&etc_netns_path)’
iproute2-6.17.0/lib/namespace.c:24:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/namespace.c:27:9: branch_false: ...to here
iproute2-6.17.0/lib/namespace.c:28:15: acquire_memory: allocated here
iproute2-6.17.0/lib/namespace.c:29:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/namespace.c:29:12: branch_false: ...to here
iproute2-6.17.0/lib/namespace.c:32:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/lib/namespace.c:32:25: danger: ‘opendir(&etc_netns_path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   30|   		return;
#   31|   
#   32|-> 	while ((entry = readdir(dir)) != NULL) {
#   33|   		if (strcmp(entry->d_name, ".") == 0)
#   34|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
iproute2-6.17.0/lib/namespace.c:132:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/run/netns")’
iproute2-6.17.0/lib/namespace.c:122:15: acquire_memory: allocated here
iproute2-6.17.0/lib/namespace.c:123:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/namespace.c:123:12: branch_false: ...to here
iproute2-6.17.0/lib/namespace.c:132:25: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/lib/namespace.c:132:25: danger: ‘opendir("/var/run/netns")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  130|   	}
#  131|   
#  132|-> 	while ((entry = readdir(dir)) != NULL) {
#  133|   		if (strcmp(entry->d_name, ".") == 0)
#  134|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
iproute2-6.17.0/lib/namespace.c:166:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘netns_get_fd(name)’
iproute2-6.17.0/lib/namespace.c:145:5: enter_function: entry to ‘netns_id_from_name’
iproute2-6.17.0/lib/namespace.c:162:14: call_function: calling ‘netns_get_fd’ from ‘netns_id_from_name’
iproute2-6.17.0/lib/namespace.c:162:14: return_function: returning to ‘netns_id_from_name’ from ‘netns_get_fd’
iproute2-6.17.0/lib/namespace.c:163:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/namespace.c:166:9: branch_false: ...to here
iproute2-6.17.0/lib/namespace.c:166:9: throw: if ‘addattr32’ throws an exception...
iproute2-6.17.0/lib/namespace.c:166:9: danger: ‘netns_get_fd(name)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  164|   		return fd;
#  165|   
#  166|-> 	addattr32(&req.n, 1024, NETNSA_FD, fd);
#  167|   	if (rtnl_talk(rtnl, &req.n, &answer) < 0) {
#  168|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
iproute2-6.17.0/lib/namespace.c:210:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘netns_get_fd(name)’
iproute2-6.17.0/lib/namespace.c:192:5: enter_function: entry to ‘set_netns_id_from_name’
iproute2-6.17.0/lib/namespace.c:206:14: call_function: calling ‘netns_get_fd’ from ‘set_netns_id_from_name’
iproute2-6.17.0/lib/namespace.c:206:14: return_function: returning to ‘set_netns_id_from_name’ from ‘netns_get_fd’
iproute2-6.17.0/lib/namespace.c:207:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/namespace.c:210:9: branch_false: ...to here
iproute2-6.17.0/lib/namespace.c:210:9: throw: if ‘addattr32’ throws an exception...
iproute2-6.17.0/lib/namespace.c:210:9: danger: ‘netns_get_fd(name)’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  208|   		return fd;
#  209|   
#  210|-> 	addattr32(&req.n, 1024, NETNSA_FD, fd);
#  211|   	addattr32(&req.n, 1024, NETNSA_NSID, nsid);
#  212|   	if (rtnl_talk(rtnl, &req.n, NULL) < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
iproute2-6.17.0/lib/rt_names.c:169:27: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirpath_base)’
iproute2-6.17.0/lib/rt_names.c:860:13: enter_function: entry to ‘protodown_reason_initialize’
iproute2-6.17.0/lib/rt_names.c:864:9: call_function: inlined call to ‘rtnl_tab_initialize_dir’ from ‘protodown_reason_initialize’
#  167|   
#  168|   	d = opendir(dirpath_base);
#  169|-> 	while (d && (de = readdir(d)) != NULL) {
#  170|   		char path[PATH_MAX];
#  171|   		size_t len;

Error: GCC_ANALYZER_WARNING (CWE-910): [#def121]
iproute2-6.17.0/lib/utils.c:100:9: warning[-Wanalyzer-double-fclose]: double ‘fclose’ of FILE ‘fopen(&fname, "r")’
iproute2-6.17.0/lib/utils.c:63:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:68:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:68:14: acquire_resource: opened here
iproute2-6.17.0/lib/utils.c:69:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:74:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:74:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:79:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:80:12: branch_false: following ‘false’ branch (when ‘nl’ is NULL)...
iproute2-6.17.0/lib/utils.c:83:9: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:83:9: release_resource: first ‘fclose’ here
iproute2-6.17.0/lib/utils.c:100:9: danger: second ‘fclose’ here; first ‘fclose’ was at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
#   98|   	return 0;
#   99|   out:
#  100|-> 	fclose(fp);
#  101|   	fprintf(stderr, "Failed to parse %s\n", fname);
#  102|   	return -1;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def122]
iproute2-6.17.0/lib/utils.c:100:9: warning[-Wanalyzer-double-free]: double-‘fclose’ of ‘fopen(&fname, "r")’
iproute2-6.17.0/lib/utils.c:63:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:68:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:68:14: acquire_memory: allocated here
iproute2-6.17.0/lib/utils.c:69:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:74:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:74:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/lib/utils.c:79:14: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:80:12: branch_false: following ‘false’ branch (when ‘nl’ is NULL)...
iproute2-6.17.0/lib/utils.c:83:9: branch_false: ...to here
iproute2-6.17.0/lib/utils.c:83:9: release_memory: first ‘fclose’ here
iproute2-6.17.0/lib/utils.c:100:9: danger: second ‘fclose’ here; first ‘fclose’ was at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
#   98|   	return 0;
#   99|   out:
#  100|-> 	fclose(fp);
#  101|   	fprintf(stderr, "Failed to parse %s\n", fname);
#  102|   	return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
iproute2-6.17.0/misc/ifstat.c:233:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  231|   	__u32 filter_mask;
#  232|   
#  233|-> 	if (rtnl_open(&rth, 0) < 0)
#  234|   		exit(1);
#  235|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
iproute2-6.17.0/misc/ifstat.c:237:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  235|   
#  236|   	if (is_extended) {
#  237|-> 		ll_init_map(&rth);
#  238|   		filter_mask = IFLA_STATS_FILTER_BIT(filter_type);
#  239|   		if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
iproute2-6.17.0/misc/ifstat.c:239:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  237|   		ll_init_map(&rth);
#  238|   		filter_mask = IFLA_STATS_FILTER_BIT(filter_type);
#  239|-> 		if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC,
#  240|   					      filter_mask, NULL, NULL) < 0) {
#  241|   			perror("Cannot send dump request");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
iproute2-6.17.0/misc/ifstat.c:241:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  239|   		if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC,
#  240|   					      filter_mask, NULL, NULL) < 0) {
#  241|-> 			perror("Cannot send dump request");
#  242|   			exit(1);
#  243|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
iproute2-6.17.0/misc/ifstat.c:245:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  243|   		}
#  244|   
#  245|-> 		if (rtnl_dump_filter(&rth, get_nlmsg_extended, NULL) < 0) {
#  246|   			perror("Dump terminated\n");
#  247|   			exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
iproute2-6.17.0/misc/ifstat.c:246:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  244|   
#  245|   		if (rtnl_dump_filter(&rth, get_nlmsg_extended, NULL) < 0) {
#  246|-> 			perror("Dump terminated\n");
#  247|   			exit(1);
#  248|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
iproute2-6.17.0/misc/ifstat.c:250:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  248|   		}
#  249|   	} else {
#  250|-> 		if (rtnl_linkdump_req(&rth, AF_INET) < 0) {
#  251|   			perror("Cannot send dump request");
#  252|   			exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
iproute2-6.17.0/misc/ifstat.c:251:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:950:17: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:952:17: call_function: calling ‘server_loop’ from ‘main’
#  249|   	} else {
#  250|   		if (rtnl_linkdump_req(&rth, AF_INET) < 0) {
#  251|-> 			perror("Cannot send dump request");
#  252|   			exit(1);
#  253|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
iproute2-6.17.0/misc/ifstat.c:943:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:943:25: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:943:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:943:25: danger: ‘fd’ leaks here
#  941|   		}
#  942|   		if (listen(fd, 5) < 0) {
#  943|-> 			perror("ifstat: listen");
#  944|   			exit(-1);
#  945|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
iproute2-6.17.0/misc/ifstat.c:947:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:930:21: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:934:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:934:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:938:59: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:938:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:942:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:942:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:946:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:946:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:947:25: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:947:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:947:25: danger: ‘fd’ leaks here
#  945|   		}
#  946|   		if (daemon(0, 0)) {
#  947|-> 			perror("ifstat: daemon");
#  948|   			exit(-1);
#  949|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
iproute2-6.17.0/misc/ifstat.c:989:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:989:25: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:989:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:989:25: danger: ‘hist_fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  987|   		}
#  988|   		if (flock(fileno(hist_fp), LOCK_EX)) {
#  989|-> 			perror("ifstat: flock history file");
#  990|   			exit(-1);
#  991|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
iproute2-6.17.0/misc/ifstat.c:993:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:993:25: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:993:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:993:25: danger: ‘hist_fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  991|   		}
#  992|   		if (fstat(fileno(hist_fp), &stb) != 0) {
#  993|-> 			perror("ifstat: fstat history file");
#  994|   			exit(-1);
#  995|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
iproute2-6.17.0/misc/ifstat.c:1012:41: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:996:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:996:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1000:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:1002:30: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1009:28: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:1011:36: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:1012:41: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1012:41: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1012:41: danger: ‘hist_fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
# 1010|   				fprintf(stderr, "ifstat: history is aged out, resetting\n");
# 1011|   				if (ftruncate(fileno(hist_fp), 0))
# 1012|-> 					perror("ifstat: ftruncate");
# 1013|   			}
# 1014|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
iproute2-6.17.0/misc/ifstat.c:1023:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:976:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1022:19: acquire_resource: stream socket created here
iproute2-6.17.0/misc/ifstat.c:1022:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:1023:55: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1023:14: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1023:14: danger: ‘fd’ leaks here
# 1021|   
# 1022|   	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
# 1023|-> 	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
# 1024|   	     || (strcpy(sun.sun_path+1, "ifstat0"),
# 1025|   		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
iproute2-6.17.0/misc/ifstat.c:1023:14: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:996:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:996:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1016:17: call_function: calling ‘load_raw_table’ from ‘main’
iproute2-6.17.0/misc/ifstat.c:1016:17: return_function: returning to ‘main’ from ‘load_raw_table’
iproute2-6.17.0/misc/ifstat.c:1022:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:1023:55: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1023:14: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1023:14: danger: ‘hist_fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
# 1021|   
# 1022|   	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
# 1023|-> 	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
# 1024|   	     || (strcpy(sun.sun_path+1, "ifstat0"),
# 1025|   		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
iproute2-6.17.0/misc/ifstat.c:1025:18: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:996:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:996:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1016:17: call_function: calling ‘load_raw_table’ from ‘main’
iproute2-6.17.0/misc/ifstat.c:1016:17: return_function: returning to ‘main’ from ‘load_raw_table’
iproute2-6.17.0/misc/ifstat.c:1022:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:1023:55: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1022:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1024:18: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:1025:18: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1025:18: danger: ‘hist_fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 1023|   	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
# 1024|   	     || (strcpy(sun.sun_path+1, "ifstat0"),
# 1025|-> 		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))
# 1026|   	    && verify_forging(fd) == 0) {
# 1027|   		FILE *sfp = fdopen(fd, "r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
iproute2-6.17.0/misc/ifstat.c:1032:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:996:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:996:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1016:17: call_function: calling ‘load_raw_table’ from ‘main’
iproute2-6.17.0/misc/ifstat.c:1016:17: return_function: returning to ‘main’ from ‘load_raw_table’
iproute2-6.17.0/misc/ifstat.c:1022:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:1023:55: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1026:16: call_function: calling ‘verify_forging’ from ‘main’
iproute2-6.17.0/misc/ifstat.c:1026:16: return_function: returning to ‘main’ from ‘verify_forging’
iproute2-6.17.0/misc/ifstat.c:1022:13: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/ifstat.c:1027:29: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1029:20: branch_true: following ‘true’ branch (when ‘sfp’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:1031:42: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1032:25: throw: if ‘close’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1032:25: danger: ‘hist_fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 1030|   			fprintf(stderr, "ifstat: fdopen failed: %s\n",
# 1031|   				strerror(errno));
# 1032|-> 			close(fd);
# 1033|   		} else  {
# 1034|   			load_raw_table(sfp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
iproute2-6.17.0/misc/ifstat.c:1043:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/ifstat.c:850:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/ifstat.c:919:12: branch_false: following ‘false’ branch (when ‘stats_type’ is NULL)...
iproute2-6.17.0/misc/ifstat.c:925:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:929:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:956:9: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:980:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:984:32: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:984:32: acquire_memory: allocated here
iproute2-6.17.0/misc/ifstat.c:984:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/ifstat.c:988:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:988:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:992:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:992:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:996:21: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:996:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1016:17: call_function: calling ‘load_raw_table’ from ‘main’
iproute2-6.17.0/misc/ifstat.c:1016:17: return_function: returning to ‘main’ from ‘load_raw_table’
iproute2-6.17.0/misc/ifstat.c:1022:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/ifstat.c:1023:55: branch_true: ...to here
iproute2-6.17.0/misc/ifstat.c:1022:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1024:18: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:1023:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ifstat.c:1043:25: branch_false: ...to here
iproute2-6.17.0/misc/ifstat.c:1043:25: throw: if ‘close’ throws an exception...
iproute2-6.17.0/misc/ifstat.c:1043:25: danger: ‘hist_fp’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
# 1041|   	} else {
# 1042|   		if (fd >= 0)
# 1043|-> 			close(fd);
# 1044|   		if (hist_db && info_source[0] && strcmp(info_source, "kernel")) {
# 1045|   			fprintf(stderr, "ifstat: history is stale, ignoring it.\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
iproute2-6.17.0/misc/lnstat.c:341:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/lnstat.c:271:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
iproute2-6.17.0/misc/lnstat.c:276:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat.c:271:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
iproute2-6.17.0/misc/lnstat.c:276:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat.c:287:54: acquire_memory: allocated here
iproute2-6.17.0/misc/lnstat.c:271:16: branch_false: following ‘false’ branch (when ‘c == -1’)...
iproute2-6.17.0/misc/lnstat.c:341:24: branch_false: ...to here
iproute2-6.17.0/misc/lnstat.c:341:24: throw: if ‘lnstat_scan_dir’ throws an exception...
iproute2-6.17.0/misc/lnstat.c:341:24: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  339|   	}
#  340|   
#  341|-> 	lnstat_files = lnstat_scan_dir(PROC_NET_STAT, num_req_files,
#  342|   				       (const char **) req_files);
#  343|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
iproute2-6.17.0/misc/lnstat.c:341:24: warning[-Wanalyzer-malloc-leak]: leak of ‘req_files[interval]’
iproute2-6.17.0/misc/lnstat.c:271:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
iproute2-6.17.0/misc/lnstat.c:276:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat.c:287:54: acquire_memory: allocated here
iproute2-6.17.0/misc/lnstat.c:341:24: throw: if ‘lnstat_scan_dir’ throws an exception...
iproute2-6.17.0/misc/lnstat.c:341:24: danger: ‘req_files[interval]’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  339|   	}
#  340|   
#  341|-> 	lnstat_files = lnstat_scan_dir(PROC_NET_STAT, num_req_files,
#  342|   				       (const char **) req_files);
#  343|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
iproute2-6.17.0/misc/lnstat_util.c:120:17: warning[-Wanalyzer-file-leak]: leak of FILE
iproute2-6.17.0/misc/lnstat_util.c:198:21: enter_function: entry to ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/lnstat_util.c:212:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat_util.c:215:20: branch_false: following ‘false’ branch (when ‘num_req_files <= 1’)...
iproute2-6.17.0/misc/lnstat_util.c:221:20: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:229:22: call_function: calling ‘alloc_and_open’ from ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:229:22: return_function: returning to ‘lnstat_scan_dir’ from ‘alloc_and_open’
iproute2-6.17.0/misc/lnstat_util.c:230:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/lnstat_util.c:232:17: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:236:21: call_function: calling ‘lnstat_scan_compat_rtstat_fields’ from ‘lnstat_scan_dir’
#  118|   	for (i = 0; i < LNSTAT_MAX_FIELDS_PER_LINE; i++) {
#  119|   		lf->fields[i].file = lf;
#  120|-> 		strncpy(lf->fields[i].name, tok, LNSTAT_MAX_FIELD_NAME_LEN);
#  121|   		/* has to be null-terminate since we initialize to zero
#  122|   		 * and field size is NAME_LEN + 1 */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
iproute2-6.17.0/misc/lnstat_util.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/lnstat_util.c:198:21: enter_function: entry to ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/lnstat_util.c:212:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat_util.c:215:20: branch_false: following ‘false’ branch (when ‘num_req_files <= 1’)...
iproute2-6.17.0/misc/lnstat_util.c:221:20: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:229:22: call_function: calling ‘alloc_and_open’ from ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:229:22: return_function: returning to ‘lnstat_scan_dir’ from ‘alloc_and_open’
iproute2-6.17.0/misc/lnstat_util.c:230:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/lnstat_util.c:232:17: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:236:21: call_function: calling ‘lnstat_scan_compat_rtstat_fields’ from ‘lnstat_scan_dir’
#  118|   	for (i = 0; i < LNSTAT_MAX_FIELDS_PER_LINE; i++) {
#  119|   		lf->fields[i].file = lf;
#  120|-> 		strncpy(lf->fields[i].name, tok, LNSTAT_MAX_FIELD_NAME_LEN);
#  121|   		/* has to be null-terminate since we initialize to zero
#  122|   		 * and field size is NAME_LEN + 1 */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def145]
iproute2-6.17.0/misc/lnstat_util.c:120:17: warning[-Wanalyzer-null-argument]: use of NULL ‘tok’ where non-null expected
iproute2-6.17.0/misc/lnstat_util.c:118:21: branch_true: following ‘true’ branch (when ‘i != 32’)...
iproute2-6.17.0/misc/lnstat_util.c:119:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat_util.c:120:17: danger: argument 2 (‘tok’) NULL where non-null expected
#  118|   	for (i = 0; i < LNSTAT_MAX_FIELDS_PER_LINE; i++) {
#  119|   		lf->fields[i].file = lf;
#  120|-> 		strncpy(lf->fields[i].name, tok, LNSTAT_MAX_FIELD_NAME_LEN);
#  121|   		/* has to be null-terminate since we initialize to zero
#  122|   		 * and field size is NAME_LEN + 1 */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
iproute2-6.17.0/misc/lnstat_util.c:124:20: warning[-Wanalyzer-file-leak]: leak of FILE
iproute2-6.17.0/misc/lnstat_util.c:198:21: enter_function: entry to ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/lnstat_util.c:212:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat_util.c:215:20: branch_false: following ‘false’ branch (when ‘num_req_files <= 1’)...
iproute2-6.17.0/misc/lnstat_util.c:221:20: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:229:22: call_function: calling ‘alloc_and_open’ from ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:229:22: return_function: returning to ‘lnstat_scan_dir’ from ‘alloc_and_open’
iproute2-6.17.0/misc/lnstat_util.c:230:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/lnstat_util.c:232:17: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:236:21: call_function: calling ‘lnstat_scan_compat_rtstat_fields’ from ‘lnstat_scan_dir’
#  122|   		 * and field size is NAME_LEN + 1 */
#  123|   		tok = strtok(NULL, " \t\n");
#  124|-> 		if (!tok) {
#  125|   			lf->num_fields = i+1;
#  126|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
iproute2-6.17.0/misc/lnstat_util.c:124:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/lnstat_util.c:198:21: enter_function: entry to ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/lnstat_util.c:212:17: branch_true: ...to here
iproute2-6.17.0/misc/lnstat_util.c:215:20: branch_false: following ‘false’ branch (when ‘num_req_files <= 1’)...
iproute2-6.17.0/misc/lnstat_util.c:221:20: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:229:22: call_function: calling ‘alloc_and_open’ from ‘lnstat_scan_dir’
iproute2-6.17.0/misc/lnstat_util.c:229:22: return_function: returning to ‘lnstat_scan_dir’ from ‘alloc_and_open’
iproute2-6.17.0/misc/lnstat_util.c:230:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/lnstat_util.c:232:17: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:236:21: call_function: calling ‘lnstat_scan_compat_rtstat_fields’ from ‘lnstat_scan_dir’
#  122|   		 * and field size is NAME_LEN + 1 */
#  123|   		tok = strtok(NULL, " \t\n");
#  124|-> 		if (!tok) {
#  125|   			lf->num_fields = i+1;
#  126|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
iproute2-6.17.0/misc/lnstat_util.c:244:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(path)’
iproute2-6.17.0/misc/lnstat_util.c:208:15: acquire_memory: allocated here
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/lnstat_util.c:209:12: branch_false: ...to here
iproute2-6.17.0/misc/lnstat_util.c:244:22: throw: if ‘readdir’ throws an exception...
iproute2-6.17.0/misc/lnstat_util.c:244:22: danger: ‘opendir(path)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  242|   	}
#  243|   
#  244|-> 	while ((de = readdir(dir))) {
#  245|   		struct lnstat_file *lf;
#  246|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def149]
iproute2-6.17.0/misc/nstat.c:48:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:633:21: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:637:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/nstat.c:637:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:641:59: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:641:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:645:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:645:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:649:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:649:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:653:17: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:655:17: call_function: calling ‘server_loop’ from ‘main’
#   46|   static FILE *net_netstat_open(void)
#   47|   {
#   48|-> 	return generic_proc_open("PROC_NET_NETSTAT", "net/netstat");
#   49|   }
#   50|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
iproute2-6.17.0/misc/nstat.c:205:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  203|   			n = malloc(sizeof(*n));
#  204|   			if (!n) {
#  205|-> 				perror("nstat: malloc");
#  206|   				exit(-1);
#  207|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
iproute2-6.17.0/misc/nstat.c:205:33: warning[-Wanalyzer-malloc-leak]: leak of ‘db’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  203|   			n = malloc(sizeof(*n));
#  204|   			if (!n) {
#  205|-> 				perror("nstat: malloc");
#  206|   				exit(-1);
#  207|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
iproute2-6.17.0/misc/nstat.c:210:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  208|   			n->id = strdup(idbuf);
#  209|   			if (n->id == NULL) {
#  210|-> 				perror("nstat: strdup");
#  211|   				exit(-1);
#  212|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
iproute2-6.17.0/misc/nstat.c:210:33: warning[-Wanalyzer-malloc-leak]: leak of ‘db’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  208|   			n->id = strdup(idbuf);
#  209|   			if (n->id == NULL) {
#  210|-> 				perror("nstat: strdup");
#  211|   				exit(-1);
#  212|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
iproute2-6.17.0/misc/nstat.c:210:33: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  208|   			n->id = strdup(idbuf);
#  209|   			if (n->id == NULL) {
#  210|-> 				perror("nstat: strdup");
#  211|   				exit(-1);
#  212|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
iproute2-6.17.0/misc/nstat.c:226:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  224|   		}
#  225|   		nread = getline(&buf, &buflen, fp);
#  226|-> 		if (nread == -1) {
#  227|   			fprintf(stderr, "%s:%d: error parsing history file\n",
#  228|   				__FILE__, __LINE__);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
iproute2-6.17.0/misc/nstat.c:236:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
iproute2-6.17.0/misc/nstat.c:739:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:744:17: call_function: calling ‘load_netstat’ from ‘main’
#  234|   		do {
#  235|   			p = strrchr(buf, ' ');
#  236|-> 			if (!p) {
#  237|   				fprintf(stderr, "%s:%d: error parsing history file\n",
#  238|   					__FILE__, __LINE__);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
iproute2-6.17.0/misc/nstat.c:646:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/nstat.c:632:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:633:21: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:637:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/nstat.c:637:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:641:59: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:641:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:645:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:645:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:646:25: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:646:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/nstat.c:646:25: danger: ‘fd’ leaks here
#  644|   		}
#  645|   		if (listen(fd, 5) < 0) {
#  646|-> 			perror("nstat: listen");
#  647|   			exit(-1);
#  648|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
iproute2-6.17.0/misc/nstat.c:650:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/nstat.c:632:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:633:21: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:637:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/nstat.c:637:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:641:59: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:641:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:645:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:645:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:649:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:649:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:650:25: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:650:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/nstat.c:650:25: danger: ‘fd’ leaks here
#  648|   		}
#  649|   		if (daemon(0, 0)) {
#  650|-> 			perror("nstat: daemon");
#  651|   			exit(-1);
#  652|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
iproute2-6.17.0/misc/nstat.c:684:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:675:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:679:32: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:679:32: acquire_memory: allocated here
iproute2-6.17.0/misc/nstat.c:679:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/nstat.c:683:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:683:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:684:25: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:684:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/nstat.c:684:25: danger: ‘hist_fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  682|   		}
#  683|   		if (flock(fileno(hist_fp), LOCK_EX)) {
#  684|-> 			perror("nstat: flock history file");
#  685|   			exit(-1);
#  686|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
iproute2-6.17.0/misc/nstat.c:688:25: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:675:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:679:32: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:679:32: acquire_memory: allocated here
iproute2-6.17.0/misc/nstat.c:679:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/nstat.c:683:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:683:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:687:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:687:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:688:25: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:688:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/nstat.c:688:25: danger: ‘hist_fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  686|   		}
#  687|   		if (fstat(fileno(hist_fp), &stb) != 0) {
#  688|-> 			perror("nstat: fstat history file");
#  689|   			exit(-1);
#  690|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
iproute2-6.17.0/misc/nstat.c:707:41: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:675:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:679:32: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:679:32: acquire_memory: allocated here
iproute2-6.17.0/misc/nstat.c:679:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/nstat.c:683:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:683:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:687:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:687:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:691:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:691:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:695:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:697:30: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:704:28: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:706:36: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:707:41: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:707:41: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/nstat.c:707:41: danger: ‘hist_fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  705|   				fprintf(stderr, "nstat: history is aged out, resetting\n");
#  706|   				if (ftruncate(fileno(hist_fp), 0) < 0)
#  707|-> 					perror("nstat: ftruncate");
#  708|   			}
#  709|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def162]
iproute2-6.17.0/misc/nstat.c:718:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:19: acquire_resource: stream socket created here
iproute2-6.17.0/misc/nstat.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:718:55: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:718:14: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/nstat.c:718:14: danger: ‘fd’ leaks here
#  716|   
#  717|   	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
#  718|-> 	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
#  719|   	     || (strcpy(sun.sun_path+1, "nstat0"),
#  720|   		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
iproute2-6.17.0/misc/nstat.c:718:14: warning[-Wanalyzer-malloc-leak]: leak of ‘hist_fp’
iproute2-6.17.0/misc/nstat.c:572:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:675:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:679:32: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:679:32: acquire_memory: allocated here
iproute2-6.17.0/misc/nstat.c:679:20: branch_false: following ‘false’ branch (when ‘hist_fp’ is non-NULL)...
iproute2-6.17.0/misc/nstat.c:683:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:683:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:687:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:687:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:691:21: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:691:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:711:17: call_function: calling ‘load_good_table’ from ‘main’
iproute2-6.17.0/misc/nstat.c:711:17: return_function: returning to ‘main’ from ‘load_good_table’
iproute2-6.17.0/misc/nstat.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:718:55: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:718:14: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/nstat.c:718:14: danger: ‘hist_fp’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5)
#  716|   
#  717|   	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
#  718|-> 	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
#  719|   	     || (strcpy(sun.sun_path+1, "nstat0"),
#  720|   		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def164]
iproute2-6.17.0/misc/nstat.c:759:21: warning[-Wanalyzer-null-argument]: use of NULL ‘hist_fp’ where non-null expected
iproute2-6.17.0/misc/nstat.c:632:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:659:9: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:671:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/nstat.c:718:55: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:717:13: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:722:29: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:752:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/nstat.c:758:13: branch_false: ...to here
iproute2-6.17.0/misc/nstat.c:758:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/nstat.c:759:21: branch_true: ...to here
iproute2-6.17.0/misc/nstat.c:759:21: danger: argument 1 (‘hist_fp’) NULL where non-null expected
#  757|   	}
#  758|   	if (!no_update) {
#  759|-> 		if (ftruncate(fileno(hist_fp), 0) < 0)
#  760|   			perror("nstat: ftruncate");
#  761|   		rewind(hist_fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
iproute2-6.17.0/misc/rtacct.c:50:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#   48|   		p = store;
#   49|   	}
#   50|-> 	return open(p, O_RDONLY);
#   51|   }
#   52|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
iproute2-6.17.0/misc/rtacct.c:78:45: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘generic_proc_open("PROC_NET_RTACCT", "net/rt_acct")’
iproute2-6.17.0/misc/rtacct.c:91:15: enter_function: entry to ‘read_kern_table’
iproute2-6.17.0/misc/rtacct.c:96:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:117:14: call_function: inlined call to ‘net_rtacct_open’ from ‘read_kern_table’
iproute2-6.17.0/misc/rtacct.c:117:14: call_function: inlined call to ‘net_rtacct_open’ from ‘read_kern_table’
iproute2-6.17.0/misc/rtacct.c:118:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:119:17: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:119:17: call_function: calling ‘nread’ from ‘read_kern_table’
iproute2-6.17.0/misc/rtacct.c:119:17: return_function: returning to ‘read_kern_table’ from ‘nread’
iproute2-6.17.0/misc/rtacct.c:78:45: danger: ‘generic_proc_open("PROC_NET_RTACCT", "net/rt_acct")’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   76|   
#   77|   	while (count < tot) {
#   78|-> 		int n = read(fd, buf+count, tot-count);
#   79|   
#   80|   		if (n < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
iproute2-6.17.0/misc/rtacct.c:100:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#   98|   			return tbl_ptr;
#   99|   
#  100|-> 		fd = open("/dev/mem", O_RDONLY);
#  101|   		if (fd < 0) {
#  102|   			perror("magic open");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def168]
iproute2-6.17.0/misc/rtacct.c:102:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#  100|   		fd = open("/dev/mem", O_RDONLY);
#  101|   		if (fd < 0) {
#  102|-> 			perror("magic open");
#  103|   			exit(-1);
#  104|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
iproute2-6.17.0/misc/rtacct.c:110:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#  108|   			       fd, magic_number);
#  109|   		if ((unsigned long)tbl_ptr == ~0UL) {
#  110|-> 			perror("magic mmap");
#  111|   			exit(-1);
#  112|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
iproute2-6.17.0/misc/rtacct.c:113:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#  111|   			exit(-1);
#  112|   		}
#  113|-> 		close(fd);
#  114|   		return tbl_ptr;
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
iproute2-6.17.0/misc/rtacct.c:120:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:425:5: enter_function: entry to ‘main’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:521:17: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:523:17: call_function: calling ‘server_loop’ from ‘main’
#  118|   	if (fd >= 0) {
#  119|   		nread(fd, (char *)tbl, 256*16);
#  120|-> 		close(fd);
#  121|   	} else {
#  122|   		memset(tbl, 0, 256*16);

Error: CPPCHECK_WARNING (CWE-758): [#def172]
iproute2-6.17.0/misc/rtacct.c:176: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  174|   		double		   *rate;
#  175|   
#  176|-> 		if (!(rmap[realm>>5] & (1<<(realm&0x1f))))
#  177|   			continue;
#  178|   

Error: CPPCHECK_WARNING (CWE-758): [#def173]
iproute2-6.17.0/misc/rtacct.c:233: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  231|   		unsigned long long rval[4];
#  232|   
#  233|-> 		if (!(rmap[realm>>5] & (1<<(realm&0x1f))))
#  234|   			continue;
#  235|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def174]
iproute2-6.17.0/misc/rtacct.c:498:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
#  496|   	sun.sun_family = AF_UNIX;
#  497|   	sun.sun_path[0] = 0;
#  498|-> 	sprintf(sun.sun_path+1, "rtacct%d", getuid());
#  499|   
#  500|   	if (scan_interval > 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def175]
iproute2-6.17.0/misc/rtacct.c:514:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:514:25: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:514:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/rtacct.c:514:25: danger: ‘fd’ leaks here
#  512|   		}
#  513|   		if (listen(fd, 5) < 0) {
#  514|-> 			perror("rtacct: listen");
#  515|   			exit(-1);
#  516|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
iproute2-6.17.0/misc/rtacct.c:518:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:501:21: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:505:27: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:505:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:509:59: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:509:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:513:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:513:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:517:21: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:517:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/misc/rtacct.c:518:25: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:518:25: throw: if ‘perror’ throws an exception...
iproute2-6.17.0/misc/rtacct.c:518:25: danger: ‘fd’ leaks here
#  516|   		}
#  517|   		if (daemon(0, 0)) {
#  518|-> 			perror("rtacct: daemon");
#  519|   			exit(-1);
#  520|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
iproute2-6.17.0/misc/rtacct.c:591:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
iproute2-6.17.0/misc/rtacct.c:500:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/rtacct.c:527:13: branch_false: ...to here
iproute2-6.17.0/misc/rtacct.c:590:19: acquire_resource: stream socket created here
iproute2-6.17.0/misc/rtacct.c:590:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
iproute2-6.17.0/misc/rtacct.c:591:55: branch_true: ...to here
iproute2-6.17.0/misc/rtacct.c:591:14: throw: if ‘connect’ throws an exception...
iproute2-6.17.0/misc/rtacct.c:591:14: danger: ‘fd’ leaks here
#  589|   
#  590|   	if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
#  591|-> 	    (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0
#  592|   	     || (strcpy(sun.sun_path+1, "rtacct0"),
#  593|   		 connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
iproute2-6.17.0/misc/ss.c:6177:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘filter_fp’
iproute2-6.17.0/misc/ss.c:5948:16: branch_true: following ‘true’ branch (when ‘ch != -1’)...
iproute2-6.17.0/misc/ss.c:5951:17: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6087:28: branch_false: following ‘false’ branch (when ‘filter_fp’ is NULL)...
iproute2-6.17.0/misc/ss.c:6091:29: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6094:45: acquire_resource: opened here
iproute2-6.17.0/misc/ss.c:6095:28: branch_false: following ‘false’ branch (when ‘filter_fp’ is non-NULL)...
iproute2-6.17.0/misc/ss.c:6095:28: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:5948:16: branch_false: following ‘false’ branch (when ‘ch == -1’)...
iproute2-6.17.0/misc/ss.c:6163:13: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6163:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ss.c:6169:12: branch_false: following ‘false’ branch (when ‘do_summary == 0’)...
iproute2-6.17.0/misc/ss.c:6169:12: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6175:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/misc/ss.c:6176:21: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6176:20: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/misc/ss.c:6177:25: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6177:25: throw: if ‘incomplete_command’ throws an exception...
iproute2-6.17.0/misc/ss.c:6177:25: danger: ‘filter_fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 6175|   	while (argc > 0) {
# 6176|   		if (strcmp(*argv, "state") == 0) {
# 6177|-> 			NEXT_ARG();
# 6178|   			if (!saw_states)
# 6179|   				state_filter = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
iproute2-6.17.0/misc/ss.c:6177:25: warning[-Wanalyzer-malloc-leak]: leak of ‘filter_fp’
iproute2-6.17.0/misc/ss.c:5948:16: branch_true: following ‘true’ branch (when ‘ch != -1’)...
iproute2-6.17.0/misc/ss.c:5951:17: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6087:28: branch_false: following ‘false’ branch (when ‘filter_fp’ is NULL)...
iproute2-6.17.0/misc/ss.c:6091:29: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6094:45: acquire_memory: allocated here
iproute2-6.17.0/misc/ss.c:6095:28: branch_false: following ‘false’ branch (when ‘filter_fp’ is non-NULL)...
iproute2-6.17.0/misc/ss.c:6095:28: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:5948:16: branch_false: following ‘false’ branch (when ‘ch == -1’)...
iproute2-6.17.0/misc/ss.c:6163:13: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6163:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/misc/ss.c:6169:12: branch_false: following ‘false’ branch (when ‘do_summary == 0’)...
iproute2-6.17.0/misc/ss.c:6169:12: branch_false: ...to here
iproute2-6.17.0/misc/ss.c:6175:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/misc/ss.c:6176:21: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6176:20: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/misc/ss.c:6177:25: branch_true: ...to here
iproute2-6.17.0/misc/ss.c:6177:25: throw: if ‘incomplete_command’ throws an exception...
iproute2-6.17.0/misc/ss.c:6177:25: danger: ‘filter_fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 6175|   	while (argc > 0) {
# 6176|   		if (strcmp(*argv, "state") == 0) {
# 6177|-> 			NEXT_ARG();
# 6178|   			if (!saw_states)
# 6179|   				state_filter = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def180]
iproute2-6.17.0/misc/ssfilter.tab.c:1085:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
iproute2-6.17.0/misc/ssfilter.y:357:5: enter_function: entry to ‘ssfilter_parse’
iproute2-6.17.0/misc/ssfilter.y:364:13: call_function: calling ‘yyparse’ from ‘ssfilter_parse’
# 1083|           if (! yyptr)
# 1084|             YYNOMEM;
# 1085|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1086|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1087|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def181]
iproute2-6.17.0/misc/ssfilter.tab.c:1212:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
iproute2-6.17.0/misc/ssfilter.y:357:5: enter_function: entry to ‘ssfilter_parse’
iproute2-6.17.0/misc/ssfilter.y:364:13: call_function: calling ‘yyparse’ from ‘ssfilter_parse’
# 1210|        unconditionally makes the parser a bit smaller, and it avoids a
# 1211|        GCC warning that YYVAL may be used uninitialized.  */
# 1212|->   yyval = yyvsp[1-yylen];
# 1213|   
# 1214|   

Error: CPPCHECK_WARNING (CWE-476): [#def182]
iproute2-6.17.0/netem/maketable.c:144: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: inverse
#  142|   	inverse = (short *)malloc(inversesize*sizeof(short));
#  143|   	for (i=0; i < inversesize; ++i) {
#  144|-> 		inverse[i] = MINSHORT;
#  145|   	}
#  146|   	for (i=0; i < tablesize; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
iproute2-6.17.0/netem/maketable.c:144:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘inverse’
iproute2-6.17.0/netem/maketable.c:142:28: acquire_memory: this call could return NULL
iproute2-6.17.0/netem/maketable.c:143:19: branch_true: following ‘true’ branch (when ‘i < inversesize’)...
iproute2-6.17.0/netem/maketable.c:144:24: branch_true: ...to here
iproute2-6.17.0/netem/maketable.c:144:17: danger: ‘inverse + (long unsigned int)i * 2’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  142|   	inverse = (short *)malloc(inversesize*sizeof(short));
#  143|   	for (i=0; i < inversesize; ++i) {
#  144|-> 		inverse[i] = MINSHORT;
#  145|   	}
#  146|   	for (i=0; i < tablesize; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
iproute2-6.17.0/rdma/dev.c:335:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(netns_path, 524288)’
iproute2-6.17.0/rdma/dev.c:319:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:324:13: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:324:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:327:17: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:327:17: acquire_resource: opened here
iproute2-6.17.0/rdma/dev.c:328:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:335:9: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:335:9: throw: if ‘rd_prepare_msg’ throws an exception...
iproute2-6.17.0/rdma/dev.c:335:9: danger: ‘open(netns_path, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  333|   	}
#  334|   
#  335|-> 	rd_prepare_msg(rd, RDMA_NLDEV_CMD_SET,
#  336|   		       &seq, (NLM_F_REQUEST | NLM_F_ACK));
#  337|   	mnl_attr_put_u32(rd->nlh, RDMA_NLDEV_ATTR_DEV_INDEX, rd->dev_idx);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
iproute2-6.17.0/rdma/dev.c:337:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(netns_path, 524288)’
iproute2-6.17.0/rdma/dev.c:319:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:324:13: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:324:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:327:17: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:327:17: acquire_resource: opened here
iproute2-6.17.0/rdma/dev.c:328:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/dev.c:335:9: branch_false: ...to here
iproute2-6.17.0/rdma/dev.c:337:9: throw: if ‘mnl_attr_put_u32’ throws an exception...
iproute2-6.17.0/rdma/dev.c:337:9: danger: ‘open(netns_path, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  335|   	rd_prepare_msg(rd, RDMA_NLDEV_CMD_SET,
#  336|   		       &seq, (NLM_F_REQUEST | NLM_F_ACK));
#  337|-> 	mnl_attr_put_u32(rd->nlh, RDMA_NLDEV_ATTR_DEV_INDEX, rd->dev_idx);
#  338|   	mnl_attr_put_u32(rd->nlh, RDMA_NLDEV_NET_NS_FD, netns);
#  339|   	ret = rd_sendrecv_msg(rd, seq);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
iproute2-6.17.0/rdma/monitor.c:155:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:155:18: throw: if ‘mnl_socket_open’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:155:18: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  153|   	}
#  154|   
#  155|-> 	rd->nl = mnl_socket_open(NETLINK_RDMA);
#  156|   	if (!rd->nl) {
#  157|   		pr_err("Failed to open NETLINK_RDMA socket. Error: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
iproute2-6.17.0/rdma/monitor.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:162:9: throw: if ‘mnl_socket_setsockopt’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:162:9: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  160|   		goto err_free;
#  161|   	}
#  162|-> 	mnl_socket_setsockopt(rd->nl, NETLINK_CAP_ACK, &one, sizeof(one));
#  163|   	mnl_socket_setsockopt(rd->nl, NETLINK_EXT_ACK, &one, sizeof(one));
#  164|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
iproute2-6.17.0/rdma/monitor.c:163:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:163:9: throw: if ‘mnl_socket_setsockopt’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:163:9: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  161|   	}
#  162|   	mnl_socket_setsockopt(rd->nl, NETLINK_CAP_ACK, &one, sizeof(one));
#  163|-> 	mnl_socket_setsockopt(rd->nl, NETLINK_EXT_ACK, &one, sizeof(one));
#  164|   
#  165|   	groups |= nl_mgrp(RDMA_NL_GROUP_NOTIFY);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
iproute2-6.17.0/rdma/monitor.c:167:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:167:15: throw: if ‘mnl_add_nl_group’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:167:15: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  165|   	groups |= nl_mgrp(RDMA_NL_GROUP_NOTIFY);
#  166|   
#  167|-> 	err = mnl_add_nl_group(rd->nl, groups);
#  168|   	if (err < 0) {
#  169|   		pr_err("Failed to add NETLINK_RDMA multicast group. Error: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
iproute2-6.17.0/rdma/monitor.c:173:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:168:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:173:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:173:9: throw: if ‘new_json_obj’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:173:9: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  171|   		goto err_close;
#  172|   	}
#  173|-> 	new_json_obj(json);
#  174|   
#  175|   	err = mnlu_socket_recv_run(rd->nl, 0, buf, MNL_SOCKET_BUFFER_SIZE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
iproute2-6.17.0/rdma/monitor.c:175:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:168:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:173:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:175:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:175:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:175:15: throw: if ‘mnlu_socket_recv_run’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:175:15: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  173|   	new_json_obj(json);
#  174|   
#  175|-> 	err = mnlu_socket_recv_run(rd->nl, 0, buf, MNL_SOCKET_BUFFER_SIZE,
#  176|   				   mon_show_cb, rd);
#  177|   	if (err) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
iproute2-6.17.0/rdma/monitor.c:187:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
iproute2-6.17.0/rdma/monitor.c:139:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:144:13: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:144:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:22: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:149:15: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:149:15: acquire_memory: allocated here
iproute2-6.17.0/rdma/monitor.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
iproute2-6.17.0/rdma/monitor.c:155:18: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:156:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/monitor.c:162:9: branch_false: ...to here
iproute2-6.17.0/rdma/monitor.c:168:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/rdma/monitor.c:169:17: branch_true: ...to here
iproute2-6.17.0/rdma/monitor.c:187:9: throw: if ‘mnl_socket_close’ throws an exception...
iproute2-6.17.0/rdma/monitor.c:187:9: danger: ‘buf’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  185|   	delete_json_obj();
#  186|   err_close:
#  187|-> 	mnl_socket_close(rd->nl);
#  188|   err_free:
#  189|   	free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
iproute2-6.17.0/rdma/rdma.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rd.buff’
iproute2-6.17.0/rdma/rdma.c:87:5: enter_function: entry to ‘main’
iproute2-6.17.0/rdma/rdma.c:160:9: branch_false: following ‘false’ branch (when ‘oneline == 0’)...
iproute2-6.17.0/rdma/rdma.c:160:9: branch_false: ...to here
iproute2-6.17.0/rdma/rdma.c:166:15: call_function: calling ‘rd_init’ from ‘main’
#   71|   		return -ENOMEM;
#   72|   
#   73|-> 	rd_prepare_msg(rd, RDMA_NLDEV_CMD_GET,
#   74|   		       &seq, (NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP));
#   75|   	ret = rd_send_msg(rd);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def194]
iproute2-6.17.0/rdma/stat.c:567:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*value’ where non-null expected
iproute2-6.17.0/rdma/stat.c:559:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/stat.c:564:9: branch_false: ...to here
iproute2-6.17.0/rdma/stat.c:565:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/stat.c:566:33: branch_false: ...to here
iproute2-6.17.0/rdma/stat.c:566:26: acquire_memory: this call could return NULL
iproute2-6.17.0/rdma/stat.c:567:23: danger: argument 1 (‘strdup(rd_argv(rd))’) from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  565|   	if (!rd_no_arg(rd)) {
#  566|   		*value = strdup(rd_argv(rd));
#  567|-> 		len = strlen(*value);
#  568|   		rd_arg_inc(rd);
#  569|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def195]
iproute2-6.17.0/rdma/stat.c:567:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opcnts’ where non-null expected
iproute2-6.17.0/rdma/stat.c:1050:12: enter_function: entry to ‘stat_one_unset_link_opcounters’
iproute2-6.17.0/rdma/stat.c:1057:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/stat.c:1062:15: branch_false: ...to here
iproute2-6.17.0/rdma/stat.c:1062:15: call_function: calling ‘stat_get_arg_str’ from ‘stat_one_unset_link_opcounters’
#  565|   	if (!rd_no_arg(rd)) {
#  566|   		*value = strdup(rd_argv(rd));
#  567|-> 		len = strlen(*value);
#  568|   		rd_arg_inc(rd);
#  569|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
iproute2-6.17.0/rdma/stat.c:568:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opcnts’
iproute2-6.17.0/rdma/stat.c:1050:12: enter_function: entry to ‘stat_one_unset_link_opcounters’
iproute2-6.17.0/rdma/stat.c:1057:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/rdma/stat.c:1062:15: branch_false: ...to here
iproute2-6.17.0/rdma/stat.c:1062:15: call_function: calling ‘stat_get_arg_str’ from ‘stat_one_unset_link_opcounters’
#  566|   		*value = strdup(rd_argv(rd));
#  567|   		len = strlen(*value);
#  568|-> 		rd_arg_inc(rd);
#  569|   	}
#  570|   

Error: CPPCHECK_WARNING (CWE-457): [#def197]
iproute2-6.17.0/rdma/utils.c:945: error[uninitvar]: Uninitialized variables: tb_entry.nla_len, tb_entry.nla_type
#  943|   			cc = 0;
#  944|   		}
#  945|-> 		if (rd_attr_check(tb_entry, &type) != MNL_CB_OK)
#  946|   			return;
#  947|   		if (!key) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def198]
iproute2-6.17.0/tc/em_canid.c:77:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:87:12: enter_function: entry to ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: this call could return NULL
iproute2-6.17.0/tc/em_canid.c:108:22: call_function: calling ‘bstrcmp’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:108:22: return_function: returning to ‘canid_parse_eopt’ from ‘bstrcmp’
iproute2-6.17.0/tc/em_canid.c:108:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:117:24: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:118:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:123:23: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:123:23: call_function: calling ‘canid_parse_rule’ from ‘canid_parse_eopt’
#   75|   	}
#   76|   
#   77|-> 	rules->rules_raw[rules->rules_cnt].can_id =
#   78|   		can_id | ((iseff) ? CAN_EFF_FLAG : 0);
#   79|   	rules->rules_raw[rules->rules_cnt].can_mask =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
iproute2-6.17.0/tc/em_canid.c:113:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: allocated here
iproute2-6.17.0/tc/em_canid.c:108:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:110:29: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:110:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:113:31: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:113:31: throw: if ‘em_parse_error’ throws an exception...
iproute2-6.17.0/tc/em_canid.c:113:31: danger: ‘rules.rules_raw’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  111|   			iseff = 1;
#  112|   		} else {
#  113|-> 			ret = PARSE_ERR(args, "canid: invalid key");
#  114|   			goto exit;
#  115|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
iproute2-6.17.0/tc/em_canid.c:119:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: allocated here
iproute2-6.17.0/tc/em_canid.c:118:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:119:31: branch_true: ...to here
iproute2-6.17.0/tc/em_canid.c:119:31: throw: if ‘em_parse_error’ throws an exception...
iproute2-6.17.0/tc/em_canid.c:119:31: danger: ‘rules.rules_raw’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  117|   		args = bstr_next(args);
#  118|   		if (args == NULL) {
#  119|-> 			ret = PARSE_ERR(args, "canid: missing argument");
#  120|   			goto exit;
#  121|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
iproute2-6.17.0/tc/em_canid.c:125:31: warning[-Wanalyzer-malloc-leak]: leak of ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:87:12: enter_function: entry to ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: allocated here
iproute2-6.17.0/tc/em_canid.c:108:22: call_function: calling ‘bstrcmp’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:108:22: return_function: returning to ‘canid_parse_eopt’ from ‘bstrcmp’
iproute2-6.17.0/tc/em_canid.c:108:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:117:24: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:118:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:123:23: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:123:23: call_function: calling ‘canid_parse_rule’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:123:23: return_function: returning to ‘canid_parse_eopt’ from ‘canid_parse_rule’
iproute2-6.17.0/tc/em_canid.c:124:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:125:31: branch_true: ...to here
iproute2-6.17.0/tc/em_canid.c:125:31: throw: if ‘em_parse_error’ throws an exception...
iproute2-6.17.0/tc/em_canid.c:125:31: danger: ‘rules.rules_raw’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  123|   		ret = canid_parse_rule(&rules, args, iseff);
#  124|   		if (ret == -1) {
#  125|-> 			ret = PARSE_ERR(args, "canid: Improperly formed CAN ID & mask\n");
#  126|   			goto exit;
#  127|   		} else if (ret == -2) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
iproute2-6.17.0/tc/em_canid.c:133:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:87:12: enter_function: entry to ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: allocated here
iproute2-6.17.0/tc/em_canid.c:108:22: call_function: calling ‘bstrcmp’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:108:22: return_function: returning to ‘canid_parse_eopt’ from ‘bstrcmp’
iproute2-6.17.0/tc/em_canid.c:108:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:117:24: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:118:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:123:23: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:123:23: call_function: calling ‘canid_parse_rule’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:123:23: return_function: returning to ‘canid_parse_eopt’ from ‘canid_parse_rule’
iproute2-6.17.0/tc/em_canid.c:124:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:127:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:127:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:131:26: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:133:9: throw: if ‘addraw_l’ throws an exception...
iproute2-6.17.0/tc/em_canid.c:133:9: danger: ‘rules.rules_raw’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  131|   	} while ((args = bstr_next(args)) != NULL);
#  132|   
#  133|-> 	addraw_l(n, MAX_MSG, hdr, sizeof(*hdr));
#  134|   	addraw_l(n, MAX_MSG, rules.rules_raw,
#  135|   		sizeof(struct can_filter) * rules.rules_cnt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
iproute2-6.17.0/tc/em_canid.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rules.rules_raw’
iproute2-6.17.0/tc/em_canid.c:87:12: enter_function: entry to ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:101:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
iproute2-6.17.0/tc/em_canid.c:104:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:104:27: acquire_memory: allocated here
iproute2-6.17.0/tc/em_canid.c:108:22: call_function: calling ‘bstrcmp’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:108:22: return_function: returning to ‘canid_parse_eopt’ from ‘bstrcmp’
iproute2-6.17.0/tc/em_canid.c:108:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/em_canid.c:117:24: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:118:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:123:23: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:123:23: call_function: calling ‘canid_parse_rule’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:123:23: return_function: returning to ‘canid_parse_eopt’ from ‘canid_parse_rule’
iproute2-6.17.0/tc/em_canid.c:124:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:127:27: branch_false: ...to here
iproute2-6.17.0/tc/em_canid.c:127:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/em_canid.c:131:26: call_function: inlined call to ‘bstr_next’ from ‘canid_parse_eopt’
iproute2-6.17.0/tc/em_canid.c:134:9: throw: if ‘addraw_l’ throws an exception...
iproute2-6.17.0/tc/em_canid.c:134:9: danger: ‘rules.rules_raw’ leaks here; was allocated at [(4)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/3)
#  132|   
#  133|   	addraw_l(n, MAX_MSG, hdr, sizeof(*hdr));
#  134|-> 	addraw_l(n, MAX_MSG, rules.rules_raw,
#  135|   		sizeof(struct can_filter) * rules.rules_cnt);
#  136|   

Error: CPPCHECK_WARNING (CWE-401): [#def204]
iproute2-6.17.0/tc/emp_ematch.l:47: error[memleakOnRealloc]: Common realloc mistake: 'strbuf' nulled but not freed upon failure
#   45|    {
#   46|    	strbuf_size += 512;
#   47|->  	strbuf = realloc(strbuf, strbuf_size);
#   48|    }
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
iproute2-6.17.0/tc/emp_ematch.lex.c:1778:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
iproute2-6.17.0/tc/emp_ematch.lex.c:1765:21: enter_function: entry to ‘ematch__create_buffer’
iproute2-6.17.0/tc/emp_ematch.lex.c:1769:24: call_function: inlined call to ‘ematch_alloc’ from ‘ematch__create_buffer’
iproute2-6.17.0/tc/emp_ematch.lex.c:1770:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.lex.c:1773:2: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.lex.c:1778:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)

Error: CPPCHECK_WARNING (CWE-476): [#def206]
iproute2-6.17.0/tc/emp_ematch.lex.c:1819: warning[nullPointer]: Possible null pointer dereference: b

Error: CPPCHECK_WARNING (CWE-476): [#def207]
iproute2-6.17.0/tc/emp_ematch.lex.c:1820: warning[nullPointer]: Possible null pointer dereference: b

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
iproute2-6.17.0/tc/emp_ematch.lex.c:2033:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
iproute2-6.17.0/tc/emp_ematch.lex.c:2017:17: enter_function: entry to ‘ematch__scan_bytes’
iproute2-6.17.0/tc/emp_ematch.lex.c:2026:24: call_function: inlined call to ‘ematch_alloc’ from ‘ematch__scan_bytes’
iproute2-6.17.0/tc/emp_ematch.lex.c:2027:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.lex.c:2027:12: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.lex.c:2035:6: call_function: calling ‘ematch__scan_buffer’ from ‘ematch__scan_bytes’

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
iproute2-6.17.0/tc/emp_ematch.tab.c:919:6: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:983:6: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:983:6: branch_false: following ‘false’ branch (when ‘yystate != 6’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:986:3: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:998:6: branch_false: following ‘false’ branch (when ‘yyn != -9’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:1004:7: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1004:6: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:1006:7: branch_true: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1016:11: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:1028:17: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1035:6: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:1038:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:1048:6: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1048:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:1052:3: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:919:6: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:925:28: branch_true: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:948:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:950:7: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:957:11: acquire_memory: allocated here
iproute2-6.17.0/tc/emp_ematch.tab.c:959:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:964:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:964:12: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:977:10: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:983:6: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:983:6: branch_false: following ‘false’ branch (when ‘yystate != 6’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:986:3: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:998:6: branch_false: following ‘false’ branch (when ‘yyn != -9’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:1004:7: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1004:6: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:1006:7: branch_true: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:1007:16: throw: if ‘ematch_lex’ throws an exception...
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: danger: ‘yyptr’ leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
#  959|           if (! yyptr)
#  960|             YYNOMEM;
#  961|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#  962|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  963|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def210]
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
iproute2-6.17.0/tc/emp_ematch.tab.c:919:6: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/emp_ematch.tab.c:925:28: branch_true: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:948:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
iproute2-6.17.0/tc/emp_ematch.tab.c:950:7: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:959:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: branch_false: ...to here
iproute2-6.17.0/tc/emp_ematch.tab.c:961:9: danger: use of uninitialized value ‘yyss’ here
#  959|           if (! yyptr)
#  960|             YYNOMEM;
#  961|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#  962|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  963|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
iproute2-6.17.0/tc/f_flower.c:1002:29: warning[-Wanalyzer-malloc-leak]: leak of ‘opts’
iproute2-6.17.0/tc/f_flower.c:964:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:965:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:964:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:965:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:964:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:965:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:999:32: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:1000:28: branch_false: following ‘false’ branch (when ‘opts’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:1002:29: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1002:29: throw: if ‘hex2mem’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:1002:29: danger: ‘opts’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
# 1000|   			if (!opts)
# 1001|   				return -1;
# 1002|-> 			if (hex2mem(token, opts, token_len / 2) < 0) {
# 1003|   				free(opts);
# 1004|   				return -1;

Error: GCC_ANALYZER_WARNING (CWE-124): [#def212]
iproute2-6.17.0/tc/f_flower.c:1304:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
iproute2-6.17.0/tc/f_flower.c:1266:16: branch_false: following ‘false’ branch (when ‘token’ is NULL)...
iproute2-6.17.0/tc/f_flower.c:1304:13: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1304:9: danger: out-of-bounds write at byte -1 but ‘key’ starts at byte 0
# 1302|   		token = strsep(&str, ",");
# 1303|   	}
# 1304|-> 	key[key_len - 1] = '\0';
# 1305|   	mask[mask_len - 1] = '\0';
# 1306|   

Error: GCC_ANALYZER_WARNING (CWE-124): [#def213]
iproute2-6.17.0/tc/f_flower.c:1305:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
iproute2-6.17.0/tc/f_flower.c:1640:12: enter_function: entry to ‘flower_parse_opt’
iproute2-6.17.0/tc/f_flower.c:1670:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1670:12: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1675:16: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:1676:21: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:1687:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1706:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1706:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1716:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1716:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:1725:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1725:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1727:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1727:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1729:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1729:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1731:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1731:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1738:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1738:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1745:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1745:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1752:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1752:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1759:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1759:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1764:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1764:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:1773:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1773:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1788:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1788:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1804:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1804:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1813:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1813:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1828:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1828:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1844:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1844:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1852:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1852:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1869:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1869:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1891:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1891:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1913:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1913:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1935:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1935:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1957:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1957:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1967:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1967:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1977:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1977:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1986:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1986:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:1996:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:1996:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2006:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2006:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2018:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2018:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2030:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2030:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2038:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2038:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2046:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2046:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2056:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2056:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2064:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2064:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2072:29: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2072:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:2077:29: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2077:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:2082:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2082:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2092:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2092:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2102:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2102:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2112:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2112:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2122:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2122:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2133:29: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2133:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:2148:29: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2148:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/f_flower.c:2169:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2169:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2181:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2181:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2193:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2193:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2201:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2201:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2209:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2209:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2219:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2219:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2229:28: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2229:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2230:25: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2230:25: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2231:31: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2231:31: call_function: calling ‘flower_parse_enc_opts_geneve’ from ‘flower_parse_opt’
# 1303|   	}
# 1304|   	key[key_len - 1] = '\0';
# 1305|-> 	mask[mask_len - 1] = '\0';
# 1306|   
# 1307|   	nest = addattr_nest(n, MAX_MSG, TCA_FLOWER_KEY_ENC_OPTS);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
iproute2-6.17.0/tc/f_flower.c:2685:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2683|   	__u16 class;
# 2684|   
# 2685|-> 	open_json_array(PRINT_JSON, name);
# 2686|   	while (rem) {
# 2687|   		parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX, i, rem);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
iproute2-6.17.0/tc/f_flower.c:2685:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2683|   	__u16 class;
# 2684|   
# 2685|-> 	open_json_array(PRINT_JSON, name);
# 2686|   	while (rem) {
# 2687|   		parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX, i, rem);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
iproute2-6.17.0/tc/f_flower.c:2687:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2685|   	open_json_array(PRINT_JSON, name);
# 2686|   	while (rem) {
# 2687|-> 		parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX, i, rem);
# 2688|   		class = rta_getattr_be16(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_CLASS]);
# 2689|   		type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
iproute2-6.17.0/tc/f_flower.c:2687:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2685|   	open_json_array(PRINT_JSON, name);
# 2686|   	while (rem) {
# 2687|-> 		parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX, i, rem);
# 2688|   		class = rta_getattr_be16(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_CLASS]);
# 2689|   		type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
iproute2-6.17.0/tc/f_flower.c:2691:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2689|   		type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE]);
# 2690|   		data_len = RTA_PAYLOAD(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]);
# 2691|-> 		hexstring_n2a(RTA_DATA(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]),
# 2692|   			      data_len, data, sizeof(data));
# 2693|   		hex2mem(data, data_r, data_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
iproute2-6.17.0/tc/f_flower.c:2691:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2689|   		type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE]);
# 2690|   		data_len = RTA_PAYLOAD(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]);
# 2691|-> 		hexstring_n2a(RTA_DATA(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]),
# 2692|   			      data_len, data, sizeof(data));
# 2693|   		hex2mem(data, data_r, data_len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
iproute2-6.17.0/tc/f_flower.c:2693:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2691|   		hexstring_n2a(RTA_DATA(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]),
# 2692|   			      data_len, data, sizeof(data));
# 2693|-> 		hex2mem(data, data_r, data_len);
# 2694|   		offset += data_len + 20;
# 2695|   		rem -= data_len + 20;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
iproute2-6.17.0/tc/f_flower.c:2693:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2691|   		hexstring_n2a(RTA_DATA(tb[TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA]),
# 2692|   			      data_len, data, sizeof(data));
# 2693|-> 		hex2mem(data, data_r, data_len);
# 2694|   		offset += data_len + 20;
# 2695|   		rem -= data_len + 20;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
iproute2-6.17.0/tc/f_flower.c:2698:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2696|   		i = RTA_DATA(attr) + offset;
# 2697|   
# 2698|-> 		open_json_object(NULL);
# 2699|   		print_uint(PRINT_JSON, "class", NULL, class);
# 2700|   		print_uint(PRINT_JSON, "type", NULL, type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
iproute2-6.17.0/tc/f_flower.c:2698:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2696|   		i = RTA_DATA(attr) + offset;
# 2697|   
# 2698|-> 		open_json_object(NULL);
# 2699|   		print_uint(PRINT_JSON, "class", NULL, class);
# 2700|   		print_uint(PRINT_JSON, "type", NULL, type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
iproute2-6.17.0/tc/f_flower.c:2701:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2699|   		print_uint(PRINT_JSON, "class", NULL, class);
# 2700|   		print_uint(PRINT_JSON, "type", NULL, type);
# 2701|-> 		open_json_array(PRINT_JSON, "data");
# 2702|   		for (ii = 0; ii < data_len; ii++)
# 2703|   			print_uint(PRINT_JSON, NULL, NULL, data_r[ii]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
iproute2-6.17.0/tc/f_flower.c:2701:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2856:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2856:17: call_function: calling ‘flower_print_geneve_opts’ from ‘flower_print_enc_opts’
# 2699|   		print_uint(PRINT_JSON, "class", NULL, class);
# 2700|   		print_uint(PRINT_JSON, "type", NULL, type);
# 2701|-> 		open_json_array(PRINT_JSON, "data");
# 2702|   		for (ii = 0; ii < data_len; ii++)
# 2703|   			print_uint(PRINT_JSON, NULL, NULL, data_r[ii]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
iproute2-6.17.0/tc/f_flower.c:2723:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2721|   	__u32 gbp;
# 2722|   
# 2723|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX, i, rem);
# 2724|   	gbp = rta_getattr_u32(tb[TCA_FLOWER_KEY_ENC_OPT_VXLAN_GBP]);
# 2725|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
iproute2-6.17.0/tc/f_flower.c:2723:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2721|   	__u32 gbp;
# 2722|   
# 2723|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX, i, rem);
# 2724|   	gbp = rta_getattr_u32(tb[TCA_FLOWER_KEY_ENC_OPT_VXLAN_GBP]);
# 2725|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
iproute2-6.17.0/tc/f_flower.c:2726:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2724|   	gbp = rta_getattr_u32(tb[TCA_FLOWER_KEY_ENC_OPT_VXLAN_GBP]);
# 2725|   
# 2726|-> 	open_json_array(PRINT_JSON, name);
# 2727|   	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
iproute2-6.17.0/tc/f_flower.c:2726:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2724|   	gbp = rta_getattr_u32(tb[TCA_FLOWER_KEY_ENC_OPT_VXLAN_GBP]);
# 2725|   
# 2726|-> 	open_json_array(PRINT_JSON, name);
# 2727|   	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
iproute2-6.17.0/tc/f_flower.c:2727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2725|   
# 2726|   	open_json_array(PRINT_JSON, name);
# 2727|-> 	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|   	close_json_object();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
iproute2-6.17.0/tc/f_flower.c:2727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2725|   
# 2726|   	open_json_array(PRINT_JSON, name);
# 2727|-> 	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|   	close_json_object();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
iproute2-6.17.0/tc/f_flower.c:2729:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2727|   	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|-> 	close_json_object();
# 2730|   	close_json_array(PRINT_JSON, name);
# 2731|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
iproute2-6.17.0/tc/f_flower.c:2729:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2727|   	open_json_object(NULL);
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|-> 	close_json_object();
# 2730|   	close_json_array(PRINT_JSON, name);
# 2731|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
iproute2-6.17.0/tc/f_flower.c:2730:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|   	close_json_object();
# 2730|-> 	close_json_array(PRINT_JSON, name);
# 2731|   
# 2732|   	sprintf(strbuf, "%u", gbp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
iproute2-6.17.0/tc/f_flower.c:2730:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2866:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2866:17: call_function: calling ‘flower_print_vxlan_opts’ from ‘flower_print_enc_opts’
# 2728|   	print_uint(PRINT_JSON, "gbp", NULL, gbp);
# 2729|   	close_json_object();
# 2730|-> 	close_json_array(PRINT_JSON, name);
# 2731|   
# 2732|   	sprintf(strbuf, "%u", gbp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
iproute2-6.17.0/tc/f_flower.c:2742:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2740|   	__u32 idx;
# 2741|   
# 2742|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX, RTA_DATA(attr),
# 2743|   		     RTA_PAYLOAD(attr));
# 2744|   	ver = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_ERSPAN_VER]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
iproute2-6.17.0/tc/f_flower.c:2742:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2740|   	__u32 idx;
# 2741|   
# 2742|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX, RTA_DATA(attr),
# 2743|   		     RTA_PAYLOAD(attr));
# 2744|   	ver = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_ERSPAN_VER]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
iproute2-6.17.0/tc/f_flower.c:2755:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2753|   	}
# 2754|   
# 2755|-> 	open_json_array(PRINT_JSON, name);
# 2756|   	open_json_object(NULL);
# 2757|   	print_uint(PRINT_JSON, "ver", NULL, ver);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
iproute2-6.17.0/tc/f_flower.c:2755:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2753|   	}
# 2754|   
# 2755|-> 	open_json_array(PRINT_JSON, name);
# 2756|   	open_json_object(NULL);
# 2757|   	print_uint(PRINT_JSON, "ver", NULL, ver);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
iproute2-6.17.0/tc/f_flower.c:2756:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2754|   
# 2755|   	open_json_array(PRINT_JSON, name);
# 2756|-> 	open_json_object(NULL);
# 2757|   	print_uint(PRINT_JSON, "ver", NULL, ver);
# 2758|   	print_uint(PRINT_JSON, "index", NULL, idx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
iproute2-6.17.0/tc/f_flower.c:2756:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2754|   
# 2755|   	open_json_array(PRINT_JSON, name);
# 2756|-> 	open_json_object(NULL);
# 2757|   	print_uint(PRINT_JSON, "ver", NULL, ver);
# 2758|   	print_uint(PRINT_JSON, "index", NULL, idx);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def242]
iproute2-6.17.0/tc/f_flower.c:2761:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2759|   	print_uint(PRINT_JSON, "dir", NULL, dir);
# 2760|   	print_uint(PRINT_JSON, "hwid", NULL, hwid);
# 2761|-> 	close_json_object();
# 2762|   	close_json_array(PRINT_JSON, name);
# 2763|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
iproute2-6.17.0/tc/f_flower.c:2761:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2876:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2876:17: call_function: calling ‘flower_print_erspan_opts’ from ‘flower_print_enc_opts’
# 2759|   	print_uint(PRINT_JSON, "dir", NULL, dir);
# 2760|   	print_uint(PRINT_JSON, "hwid", NULL, hwid);
# 2761|-> 	close_json_object();
# 2762|   	close_json_array(PRINT_JSON, name);
# 2763|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
iproute2-6.17.0/tc/f_flower.c:2773:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2886:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2886:17: call_function: calling ‘flower_print_gtp_opts’ from ‘flower_print_enc_opts’
# 2771|   	__u8 pdu_type, qfi;
# 2772|   
# 2773|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GTP_MAX, RTA_DATA(attr),
# 2774|   		     RTA_PAYLOAD(attr));
# 2775|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
iproute2-6.17.0/tc/f_flower.c:2773:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2886:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2886:17: call_function: calling ‘flower_print_gtp_opts’ from ‘flower_print_enc_opts’
# 2771|   	__u8 pdu_type, qfi;
# 2772|   
# 2773|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_GTP_MAX, RTA_DATA(attr),
# 2774|   		     RTA_PAYLOAD(attr));
# 2775|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
iproute2-6.17.0/tc/f_flower.c:2791:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2789|   	__u8 type;
# 2790|   
# 2791|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX, i, rem);
# 2792|   	type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_TYPE]);
# 2793|   	seid = rta_getattr_be64(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
iproute2-6.17.0/tc/f_flower.c:2791:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2789|   	__u8 type;
# 2790|   
# 2791|-> 	parse_rtattr(tb, TCA_FLOWER_KEY_ENC_OPT_PFCP_MAX, i, rem);
# 2792|   	type = rta_getattr_u8(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_TYPE]);
# 2793|   	seid = rta_getattr_be64(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
iproute2-6.17.0/tc/f_flower.c:2795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2793|   	seid = rta_getattr_be64(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID]);
# 2794|   
# 2795|-> 	open_json_array(PRINT_JSON, name);
# 2796|   	open_json_object(NULL);
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
iproute2-6.17.0/tc/f_flower.c:2795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2793|   	seid = rta_getattr_be64(tb[TCA_FLOWER_KEY_ENC_OPT_PFCP_SEID]);
# 2794|   
# 2795|-> 	open_json_array(PRINT_JSON, name);
# 2796|   	open_json_object(NULL);
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
iproute2-6.17.0/tc/f_flower.c:2796:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2794|   
# 2795|   	open_json_array(PRINT_JSON, name);
# 2796|-> 	open_json_object(NULL);
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
iproute2-6.17.0/tc/f_flower.c:2796:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2794|   
# 2795|   	open_json_array(PRINT_JSON, name);
# 2796|-> 	open_json_object(NULL);
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
iproute2-6.17.0/tc/f_flower.c:2799:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);
# 2799|-> 	close_json_object();
# 2800|   	close_json_array(PRINT_JSON, name);
# 2801|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
iproute2-6.17.0/tc/f_flower.c:2799:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2797|   	print_uint(PRINT_JSON, "type", NULL, type);
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);
# 2799|-> 	close_json_object();
# 2800|   	close_json_array(PRINT_JSON, name);
# 2801|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
iproute2-6.17.0/tc/f_flower.c:2800:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);
# 2799|   	close_json_object();
# 2800|-> 	close_json_array(PRINT_JSON, name);
# 2801|   
# 2802|   	snprintf(strbuf, len, "%02x:%llx", type, seid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
iproute2-6.17.0/tc/f_flower.c:2800:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2831:13: enter_function: entry to ‘flower_print_enc_opts’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2855:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2865:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2865:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2875:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2875:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2885:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2885:19: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/f_flower.c:2897:20: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2897:19: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/f_flower.c:2898:17: branch_true: ...to here
iproute2-6.17.0/tc/f_flower.c:2898:17: call_function: calling ‘flower_print_pfcp_opts’ from ‘flower_print_enc_opts’
# 2798|   	print_uint(PRINT_JSON, "seid", NULL, seid);
# 2799|   	close_json_object();
# 2800|-> 	close_json_array(PRINT_JSON, name);
# 2801|   
# 2802|   	snprintf(strbuf, len, "%02x:%llx", type, seid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
iproute2-6.17.0/tc/f_flower.c:2826:9: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
iproute2-6.17.0/tc/f_flower.c:2812:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2813:12: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2817:21: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2826:9: throw: if ‘print_nl’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:2826:9: danger: ‘out’ leaks here; was allocated at [(1)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/0)
# 2824|   
# 2825|   	out[len - 1] = '\0';
# 2826|-> 	print_nl();
# 2827|   	print_string(PRINT_FP, name, namefrm, out);
# 2828|   	free(out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
iproute2-6.17.0/tc/f_flower.c:2852:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2852:9: throw: if ‘parse_rtattr_flags’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:2852:9: danger: ‘key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/2)
# 2850|   		goto err_key_free;
# 2851|   
# 2852|-> 	parse_rtattr_nested(key_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, attr);
# 2853|   	parse_rtattr_nested(msk_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, mask_attr);
# 2854|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
iproute2-6.17.0/tc/f_flower.c:2852:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2852:9: throw: if ‘parse_rtattr_flags’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:2852:9: danger: ‘msk’ leaks here; was allocated at [(5)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/4)
# 2850|   		goto err_key_free;
# 2851|   
# 2852|-> 	parse_rtattr_nested(key_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, attr);
# 2853|   	parse_rtattr_nested(msk_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, mask_attr);
# 2854|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
iproute2-6.17.0/tc/f_flower.c:2853:9: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2844:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2853:9: throw: if ‘parse_rtattr_flags’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:2853:9: danger: ‘key’ leaks here; was allocated at [(3)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/2)
# 2851|   
# 2852|   	parse_rtattr_nested(key_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, attr);
# 2853|-> 	parse_rtattr_nested(msk_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, mask_attr);
# 2854|   
# 2855|   	if (key_tb[TCA_FLOWER_KEY_ENC_OPTS_GENEVE]) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
iproute2-6.17.0/tc/f_flower.c:2853:9: warning[-Wanalyzer-malloc-leak]: leak of ‘msk’
iproute2-6.17.0/tc/f_flower.c:2839:12: branch_false: following ‘false’ branch (when ‘attr’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2842:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2845:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2848:15: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2848:15: acquire_memory: allocated here
iproute2-6.17.0/tc/f_flower.c:2849:12: branch_false: following ‘false’ branch (when ‘msk’ is non-NULL)...
iproute2-6.17.0/tc/f_flower.c:2852:9: branch_false: ...to here
iproute2-6.17.0/tc/f_flower.c:2853:9: throw: if ‘parse_rtattr_flags’ throws an exception...
iproute2-6.17.0/tc/f_flower.c:2853:9: danger: ‘msk’ leaks here; was allocated at [(5)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/4)
# 2851|   
# 2852|   	parse_rtattr_nested(key_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, attr);
# 2853|-> 	parse_rtattr_nested(msk_tb, TCA_FLOWER_KEY_ENC_OPTS_MAX, mask_attr);
# 2854|   
# 2855|   	if (key_tb[TCA_FLOWER_KEY_ENC_OPTS_GENEVE]) {

Error: COMPILER_WARNING (CWE-704): [#def261]
iproute2-6.17.0/tc/f_u32.c: scope_hint: In function ‘get_u32_handle’
iproute2-6.17.0/tc/f_u32.c:44:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   44 |         char *tmp = strchr(str, ':');
#      |                     ^~~~~~
#   42|   {
#   43|   	__u32 htid = 0, hash = 0, nodeid = 0;
#   44|-> 	char *tmp = strchr(str, ':');
#   45|   
#   46|   	if (tmp == NULL) {

Error: COMPILER_WARNING (CWE-704): [#def262]
iproute2-6.17.0/tc/f_u32.c:44:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   42|   {
#   43|   	__u32 htid = 0, hash = 0, nodeid = 0;
#   44|-> 	char *tmp = strchr(str, ':');
#   45|   
#   46|   	if (tmp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
iproute2-6.17.0/tc/m_ematch.c:480:21: warning[-Wanalyzer-malloc-leak]: leak of ‘tb’
iproute2-6.17.0/tc/m_ematch.c:494:5: enter_function: entry to ‘print_ematch’
iproute2-6.17.0/tc/m_ematch.c:499:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_ematch.c:502:13: branch_false: ...to here
iproute2-6.17.0/tc/m_ematch.c:502:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_ematch.c:507:13: branch_false: ...to here
iproute2-6.17.0/tc/m_ematch.c:507:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_ematch.c:512:13: branch_false: ...to here
iproute2-6.17.0/tc/m_ematch.c:512:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_ematch.c:517:9: branch_false: ...to here
iproute2-6.17.0/tc/m_ematch.c:519:16: call_function: calling ‘print_ematch_list’ from ‘print_ematch’
#  478|   
#  479|   	if (hdr->nmatches > 0) {
#  480|-> 		if (parse_rtattr_nested(tb, hdr->nmatches, rta) < 0)
#  481|   			goto errout;
#  482|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def264]
iproute2-6.17.0/tc/m_gate.c:132:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*n.list.next’
iproute2-6.17.0/tc/m_gate.c:138:12: enter_function: entry to ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:157:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:164:9: call_function: inlined call to ‘INIT_LIST_HEAD’ from ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:166:16: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:167:21: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:173:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:179:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:179:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:186:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:186:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:193:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:193:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:200:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:200:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:206:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:206:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:212:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:212:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:213:38: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:221:28: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:222:33: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:224:33: call_function: calling ‘free_entries’ from ‘parse_gate’
#  130|   	struct gate_entry *e, *n;
#  131|   
#  132|-> 	list_for_each_entry_safe(e, n, gate_entries, list) {
#  133|   		list_del(&e->list);
#  134|   		free(e);

Error: GCC_ANALYZER_WARNING (CWE-590): [#def265]
iproute2-6.17.0/tc/m_gate.c:134:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘e’ which points to memory on the stack
iproute2-6.17.0/tc/m_gate.c:138:12: enter_function: entry to ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:157:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:164:9: call_function: inlined call to ‘INIT_LIST_HEAD’ from ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:166:16: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:167:21: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:173:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:179:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:179:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:186:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:186:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:193:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:193:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:200:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:200:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:206:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:206:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:212:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:212:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:213:38: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:221:28: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:222:33: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:224:33: call_function: calling ‘free_entries’ from ‘parse_gate’
#  132|   	list_for_each_entry_safe(e, n, gate_entries, list) {
#  133|   		list_del(&e->list);
#  134|-> 		free(e);
#  135|   	}
#  136|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
iproute2-6.17.0/tc/m_gate.c:304:25: warning[-Wanalyzer-malloc-leak]: leak of ‘create_gate_entry(gate_state,  interval,  ipv,  maxoctets)’
iproute2-6.17.0/tc/m_gate.c:138:12: enter_function: entry to ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:157:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:160:9: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:164:9: call_function: inlined call to ‘INIT_LIST_HEAD’ from ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:166:16: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:167:21: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:173:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:179:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:179:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:186:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:186:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:193:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:193:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:200:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:200:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:206:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:206:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:212:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:212:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_gate.c:213:38: branch_true: ...to here
iproute2-6.17.0/tc/m_gate.c:221:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:228:25: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:230:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:237:28: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:237:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:244:25: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:254:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:258:35: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:296:29: call_function: calling ‘create_gate_entry’ from ‘parse_gate’
iproute2-6.17.0/tc/m_gate.c:296:29: return_function: returning to ‘parse_gate’ from ‘create_gate_entry’
iproute2-6.17.0/tc/m_gate.c:298:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_gate.c:304:25: branch_false: ...to here
iproute2-6.17.0/tc/m_gate.c:304:25: danger: ‘create_gate_entry(gate_state,  interval,  ipv,  maxoctets)’ leaks here; was allocated at [(33)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/32)
#  302|   			}
#  303|   
#  304|-> 			list_add_tail(&e->list, &gate_entries);
#  305|   			entry_num++;
#  306|   		} else if (matches(*argv, "help") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
iproute2-6.17.0/tc/m_pedit.c:579:17: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:784:23: call_function: calling ‘pedit_keys_ex_getattr’ from ‘print_pedit’
#  577|   			return -1;
#  578|   
#  579|-> 		parse_rtattr_nested(tb, TCA_PEDIT_KEY_EX_MAX, i);
#  580|   
#  581|   		k->htype = rta_getattr_u16(tb[TCA_PEDIT_KEY_EX_HTYPE]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
iproute2-6.17.0/tc/m_pedit.c:794:9: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:794:9: throw: if ‘print_action_control’ throws an exception...
iproute2-6.17.0/tc/m_pedit.c:794:9: danger: ‘keys_ex’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  792|   	}
#  793|   
#  794|-> 	print_action_control("action ", sel->action, " ");
#  795|   	print_uint(PRINT_ANY, "nkeys", "keys %d\n", sel->nkeys);
#  796|   	print_uint(PRINT_ANY, "index", " \t index %u", sel->index);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
iproute2-6.17.0/tc/m_pedit.c:804:25: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:800:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:801:21: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:801:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:802:39: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:804:25: throw: if ‘print_tm’ throws an exception...
iproute2-6.17.0/tc/m_pedit.c:804:25: danger: ‘keys_ex’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  802|   			struct tcf_t *tm = RTA_DATA(tb[TCA_PEDIT_TM]);
#  803|   
#  804|-> 			print_tm(tm);
#  805|   		}
#  806|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
iproute2-6.17.0/tc/m_pedit.c:807:9: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:807:9: throw: if ‘open_json_array’ throws an exception...
iproute2-6.17.0/tc/m_pedit.c:807:9: danger: ‘keys_ex’ leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  805|   		}
#  806|   	}
#  807|-> 	open_json_array(PRINT_JSON, "keys");
#  808|   	if (sel->nkeys) {
#  809|   		int i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
iproute2-6.17.0/tc/m_pedit.c:825:25: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:808:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:810:38: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:813:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: following ‘true’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:819:33: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:825:25: throw: if ‘open_json_object’ throws an exception...
iproute2-6.17.0/tc/m_pedit.c:825:25: danger: ‘keys_ex’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  823|   			}
#  824|   
#  825|-> 			open_json_object(NULL);
#  826|   			print_uint(PRINT_FP, NULL, "\n\t key #%d  at ", i);
#  827|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
iproute2-6.17.0/tc/m_pedit.c:845:25: warning[-Wanalyzer-malloc-leak]: leak of ‘keys_ex’
iproute2-6.17.0/tc/m_pedit.c:748:12: enter_function: entry to ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:761:13: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:766:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:771:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:773:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:778:34: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:778:27: acquire_memory: allocated here
iproute2-6.17.0/tc/m_pedit.c:779:20: branch_false: following ‘false’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:784:23: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:784:23: call_function: calling ‘pedit_keys_ex_getattr’ from ‘print_pedit’
iproute2-6.17.0/tc/m_pedit.c:784:23: return_function: returning to ‘print_pedit’ from ‘pedit_keys_ex_getattr’
iproute2-6.17.0/tc/m_pedit.c:786:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:794:9: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:808:12: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:810:38: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:813:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:818:28: branch_true: following ‘true’ branch (when ‘keys_ex’ is non-NULL)...
iproute2-6.17.0/tc/m_pedit.c:819:33: branch_true: ...to here
iproute2-6.17.0/tc/m_pedit.c:829:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_pedit.c:837:25: branch_false: ...to here
iproute2-6.17.0/tc/m_pedit.c:845:25: throw: if ‘close_json_object’ throws an exception...
iproute2-6.17.0/tc/m_pedit.c:845:25: danger: ‘keys_ex’ leaks here; was allocated at [(8)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/7)
#  843|   			print_hex(PRINT_ANY, "mask", " mask %08x",
#  844|   				  (unsigned int)ntohl(key->mask));
#  845|-> 			close_json_object();
#  846|   		}
#  847|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
iproute2-6.17.0/tc/m_tunnel_key.c:176:29: warning[-Wanalyzer-malloc-leak]: leak of ‘opts’
iproute2-6.17.0/tc/m_tunnel_key.c:152:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/m_tunnel_key.c:153:17: branch_true: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:157:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_tunnel_key.c:189:25: branch_false: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:152:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/m_tunnel_key.c:153:17: branch_true: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:164:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/m_tunnel_key.c:189:25: branch_false: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:152:16: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
iproute2-6.17.0/tc/m_tunnel_key.c:153:17: branch_true: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:173:32: acquire_memory: allocated here
iproute2-6.17.0/tc/m_tunnel_key.c:174:28: branch_false: following ‘false’ branch (when ‘opts’ is non-NULL)...
iproute2-6.17.0/tc/m_tunnel_key.c:176:29: branch_false: ...to here
iproute2-6.17.0/tc/m_tunnel_key.c:176:29: throw: if ‘hex2mem’ throws an exception...
iproute2-6.17.0/tc/m_tunnel_key.c:176:29: danger: ‘opts’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  174|   			if (!opts)
#  175|   				return -1;
#  176|-> 			if (hex2mem(token, opts, token_len / 2) < 0) {
#  177|   				free(opts);
#  178|   				return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
iproute2-6.17.0/tc/q_mqprio.c:101:37: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
iproute2-6.17.0/tc/q_mqprio.c:71:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_mqprio.c:73:21: branch_true: ...to here
iproute2-6.17.0/tc/q_mqprio.c:93:32: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_mqprio.c:94:33: branch_true: ...to here
iproute2-6.17.0/tc/q_mqprio.c:96:39: acquire_memory: allocated here
iproute2-6.17.0/tc/q_mqprio.c:97:36: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
iproute2-6.17.0/tc/q_mqprio.c:100:39: branch_false: ...to here
iproute2-6.17.0/tc/q_mqprio.c:101:37: throw: if ‘get_u16’ throws an exception...
iproute2-6.17.0/tc/q_mqprio.c:101:37: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   99|   
#  100|   				tok = strtok(tmp, "@");
#  101|-> 				if (get_u16(&opt.count[idx], tok, 10)) {
#  102|   					free(tmp);
#  103|   					PREV_ARG();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
iproute2-6.17.0/tc/q_mqprio.c:107:37: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
iproute2-6.17.0/tc/q_mqprio.c:71:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_mqprio.c:73:21: branch_true: ...to here
iproute2-6.17.0/tc/q_mqprio.c:93:32: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_mqprio.c:94:33: branch_true: ...to here
iproute2-6.17.0/tc/q_mqprio.c:96:39: acquire_memory: allocated here
iproute2-6.17.0/tc/q_mqprio.c:97:36: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
iproute2-6.17.0/tc/q_mqprio.c:100:39: branch_false: ...to here
iproute2-6.17.0/tc/q_mqprio.c:101:36: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_mqprio.c:106:39: branch_false: ...to here
iproute2-6.17.0/tc/q_mqprio.c:107:37: throw: if ‘get_u16’ throws an exception...
iproute2-6.17.0/tc/q_mqprio.c:107:37: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  105|   				}
#  106|   				tok = strtok(NULL, "@");
#  107|-> 				if (get_u16(&opt.offset[idx], tok, 10)) {
#  108|   					free(tmp);
#  109|   					PREV_ARG();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
iproute2-6.17.0/tc/q_netem.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:416:25: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:416:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:417:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:417:37: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:418:28: branch_false: following ‘false’ branch (when ‘dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:421:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:421:37: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
#  132|   	char name[128];
#  133|   
#  134|-> 	snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
#  135|   	f = fopen(name, "r");
#  136|   	if (f == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
iproute2-6.17.0/tc/q_netem.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
#  132|   	char name[128];
#  133|   
#  134|-> 	snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
#  135|   	f = fopen(name, "r");
#  136|   	if (f == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
iproute2-6.17.0/tc/q_netem.c:490:41: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_true: following ‘true’ branch (when ‘argc == 0’)...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: throw: if ‘incomplete_command’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:490:41: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/37)
#  488|   						return -1;
#  489|   					}
#  490|-> 					NEXT_ARG();
#  491|   					if (get_time64(&slot.dist_delay, *argv)) {
#  492|   						explain1("slot delay");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
iproute2-6.17.0/tc/q_netem.c:491:45: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:45: throw: if ‘get_time64’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:491:45: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/37)
#  489|   					}
#  490|   					NEXT_ARG();
#  491|-> 					if (get_time64(&slot.dist_delay, *argv)) {
#  492|   						explain1("slot delay");
#  493|   						return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
iproute2-6.17.0/tc/q_netem.c:495:41: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_true: following ‘true’ branch (when ‘argc == 0’)...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: throw: if ‘incomplete_command’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:495:41: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/37)
#  493|   						return -1;
#  494|   					}
#  495|-> 					NEXT_ARG();
#  496|   					if (get_time64(&slot.dist_jitter, *argv)) {
#  497|   						explain1("slot jitter");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
iproute2-6.17.0/tc/q_netem.c:496:45: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:496:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:496:45: throw: if ‘get_time64’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:496:45: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/37)
#  494|   					}
#  495|   					NEXT_ARG();
#  496|-> 					if (get_time64(&slot.dist_jitter, *argv)) {
#  497|   						explain1("slot jitter");
#  498|   						return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
iproute2-6.17.0/tc/q_netem.c:511:29: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:496:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:496:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:500:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:500:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:510:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:510:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:511:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:511:29: throw: if ‘matches’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:511:29: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/37)
#  509|   			}
#  510|   			if (NEXT_ARG_OK() &&
#  511|-> 			    matches(*(argv+1), "packets") == 0) {
#  512|   				NEXT_ARG();
#  513|   				if (!NEXT_ARG_OK() ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
iproute2-6.17.0/tc/q_netem.c:514:37: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:496:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:496:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:500:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:500:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:510:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:510:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:511:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:510:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:512:33: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:513:36: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:514:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:514:37: throw: if ‘get_s32’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:514:37: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/37)
#  512|   				NEXT_ARG();
#  513|   				if (!NEXT_ARG_OK() ||
#  514|-> 				    get_s32(&slot.max_packets, *(argv+1), 0)) {
#  515|   					explain1("slot packets");
#  516|   					return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
iproute2-6.17.0/tc/q_netem.c:521:29: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:496:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:496:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:500:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:500:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:510:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:510:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:511:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:520:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:521:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:521:29: throw: if ‘matches’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:521:29: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/37)
#  519|   			}
#  520|   			if (NEXT_ARG_OK() &&
#  521|-> 			    matches(*(argv+1), "bytes") == 0) {
#  522|   				unsigned int max_bytes;
#  523|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
iproute2-6.17.0/tc/q_netem.c:526:37: warning[-Wanalyzer-malloc-leak]: leak of ‘slot_dist_data’
iproute2-6.17.0/tc/q_netem.c:174:12: enter_function: entry to ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:197:17: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_netem.c:198:21: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:204:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:205:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:204:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:235:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:234:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:357:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:357:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:364:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:364:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:366:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:366:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:381:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:381:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:396:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:396:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:402:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:402:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:415:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:415:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:426:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:426:27: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:459:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:459:27: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:460:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:460:29: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:479:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:479:36: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_netem.c:480:41: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:481:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:482:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:482:58: acquire_memory: allocated here
iproute2-6.17.0/tc/q_netem.c:483:44: branch_false: following ‘false’ branch (when ‘slot_dist_data’ is non-NULL)...
iproute2-6.17.0/tc/q_netem.c:485:58: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:485:58: call_function: calling ‘get_distribution’ from ‘netem_parse_opt’
iproute2-6.17.0/tc/q_netem.c:485:58: return_function: returning to ‘netem_parse_opt’ from ‘get_distribution’
iproute2-6.17.0/tc/q_netem.c:486:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:490:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:491:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:491:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:495:41: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_netem.c:496:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:496:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:500:45: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:500:44: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_netem.c:510:28: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:510:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:511:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:520:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:521:29: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:520:29: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_netem.c:524:33: branch_true: ...to here
iproute2-6.17.0/tc/q_netem.c:525:36: branch_false: following ‘false’ branch (when ‘argc != 1’)...
iproute2-6.17.0/tc/q_netem.c:526:37: branch_false: ...to here
iproute2-6.17.0/tc/q_netem.c:526:37: throw: if ‘get_size’ throws an exception...
iproute2-6.17.0/tc/q_netem.c:526:37: danger: ‘slot_dist_data’ leaks here; was allocated at [(38)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/37)
#  524|   				NEXT_ARG();
#  525|   				if (!NEXT_ARG_OK() ||
#  526|-> 				    get_size(&max_bytes, *(argv+1))) {
#  527|   					explain1("slot bytes");
#  528|   					return -1;

Error: CPPCHECK_WARNING (CWE-457): [#def286]
iproute2-6.17.0/tc/q_prio.c:104: error[uninitvar]: Uninitialized variable: qopt
#  102|   					sizeof(*qopt)))
#  103|   		return -1;
#  104|-> 	if (qopt == NULL)
#  105|   		return -1;	/* missing data from kernel */
#  106|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
iproute2-6.17.0/tc/q_taprio.c:196:37: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
iproute2-6.17.0/tc/q_taprio.c:166:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_taprio.c:168:21: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:188:32: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_taprio.c:189:33: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:191:39: acquire_memory: allocated here
iproute2-6.17.0/tc/q_taprio.c:192:36: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
iproute2-6.17.0/tc/q_taprio.c:195:39: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:196:37: throw: if ‘get_u16’ throws an exception...
iproute2-6.17.0/tc/q_taprio.c:196:37: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  194|   
#  195|   				tok = strtok(tmp, "@");
#  196|-> 				if (get_u16(&opt.count[idx], tok, 10)) {
#  197|   					free(tmp);
#  198|   					PREV_ARG();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
iproute2-6.17.0/tc/q_taprio.c:202:37: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
iproute2-6.17.0/tc/q_taprio.c:166:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_taprio.c:168:21: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:188:32: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/q_taprio.c:189:33: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:191:39: acquire_memory: allocated here
iproute2-6.17.0/tc/q_taprio.c:192:36: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
iproute2-6.17.0/tc/q_taprio.c:195:39: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:196:36: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_taprio.c:201:39: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:202:37: throw: if ‘get_u16’ throws an exception...
iproute2-6.17.0/tc/q_taprio.c:202:37: danger: ‘tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  200|   				}
#  201|   				tok = strtok(NULL, "@");
#  202|-> 				if (get_u16(&opt.offset[idx], tok, 10)) {
#  203|   					free(tmp);
#  204|   					PREV_ARG();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
iproute2-6.17.0/tc/q_taprio.c:267:25: warning[-Wanalyzer-malloc-leak]: leak of ‘create_entry(mask,  interval,  cmd)’
iproute2-6.17.0/tc/q_taprio.c:145:12: enter_function: entry to ‘taprio_parse_opt’
iproute2-6.17.0/tc/q_taprio.c:166:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/q_taprio.c:168:21: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:174:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/q_taprio.c:185:28: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:185:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/q_taprio.c:210:28: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:210:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/q_taprio.c:225:28: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:225:27: branch_false: following ‘false’ branch (when the strings are non-equal)...
iproute2-6.17.0/tc/q_taprio.c:236:28: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:236:27: branch_true: following ‘true’ branch (when the strings are equal)...
iproute2-6.17.0/tc/q_taprio.c:241:25: branch_true: ...to here
iproute2-6.17.0/tc/q_taprio.c:241:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_taprio.c:242:31: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:243:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_taprio.c:247:25: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:249:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_taprio.c:250:29: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:250:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_taprio.c:255:25: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:255:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/q_taprio.c:256:29: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:256:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_taprio.c:261:29: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:261:29: call_function: calling ‘create_entry’ from ‘taprio_parse_opt’
iproute2-6.17.0/tc/q_taprio.c:261:29: return_function: returning to ‘taprio_parse_opt’ from ‘create_entry’
iproute2-6.17.0/tc/q_taprio.c:262:28: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/q_taprio.c:267:25: branch_false: ...to here
iproute2-6.17.0/tc/q_taprio.c:267:25: danger: ‘create_entry(mask,  interval,  cmd)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/27)
#  265|   			}
#  266|   
#  267|-> 			list_add_tail(&e->list, &sched_entries);
#  268|   
#  269|   		} else if (strcmp(*argv, "base-time") == 0) {

Error: CPPCHECK_WARNING (CWE-476): [#def290]
iproute2-6.17.0/tc/tc_class.c:161: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  159|   	struct graph_node *node = calloc(1, sizeof(struct graph_node));
#  160|   
#  161|-> 	node->id         = id;
#  162|   	node->parent_id  = parent_id;
#  163|   

Error: CPPCHECK_WARNING (CWE-476): [#def291]
iproute2-6.17.0/tc/tc_class.c:162: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#  160|   
#  161|   	node->id         = id;
#  162|-> 	node->parent_id  = parent_id;
#  163|   
#  164|   	if (data && len) {

Error: CPPCHECK_WARNING (CWE-401): [#def292]
iproute2-6.17.0/tc/tc_class.c:174: error[memleak]: Memory leak: node
#  172|   	else
#  173|   		hlist_add_head(&node->hlist, &cls_list);
#  174|-> }
#  175|   
#  176|   static void graph_indent(char *buf, struct graph_node *node, int is_newline,

Error: CPPCHECK_WARNING (CWE-457): [#def293]
iproute2-6.17.0/tc/tc_class.c:225: error[uninitvar]: Uninitialized variable: tmp_chld
#  223|   				hlist);
#  224|   
#  225|-> 		hlist_for_each_safe(c, tmp_chld, &cls_list) {
#  226|   			struct graph_node *child = container_of(c,
#  227|   					struct graph_node, hlist);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def294]
iproute2-6.17.0/tc/tc_monitor.c:98:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
iproute2-6.17.0/tc/tc_monitor.c:74:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/tc_monitor.c:75:21: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:75:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/tc_monitor.c:76:25: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:76:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/tc_monitor.c:77:25: branch_false: ...to here
iproute2-6.17.0/tc/tc_monitor.c:89:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/tc/tc_monitor.c:90:28: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:90:28: acquire_resource: opened here
iproute2-6.17.0/tc/tc_monitor.c:93:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/tc_monitor.c:98:23: branch_false: ...to here
iproute2-6.17.0/tc/tc_monitor.c:98:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/tc/tc_monitor.c:98:23: danger: ‘fopen(file, "r")’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   96|   		}
#   97|   
#   98|-> 		ret = rtnl_from_file(fp, accept_tcmsg, stdout);
#   99|   		fclose(fp);
#  100|   		return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
iproute2-6.17.0/tc/tc_monitor.c:98:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
iproute2-6.17.0/tc/tc_monitor.c:74:16: branch_true: following ‘true’ branch (when ‘argc > 0’)...
iproute2-6.17.0/tc/tc_monitor.c:75:21: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:75:20: branch_true: following ‘true’ branch...
iproute2-6.17.0/tc/tc_monitor.c:76:25: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:76:25: branch_false: following ‘false’ branch (when ‘argc != 0’)...
iproute2-6.17.0/tc/tc_monitor.c:77:25: branch_false: ...to here
iproute2-6.17.0/tc/tc_monitor.c:89:12: branch_true: following ‘true’ branch (when ‘file’ is non-NULL)...
iproute2-6.17.0/tc/tc_monitor.c:90:28: branch_true: ...to here
iproute2-6.17.0/tc/tc_monitor.c:90:28: acquire_memory: allocated here
iproute2-6.17.0/tc/tc_monitor.c:93:20: branch_false: following ‘false’ branch...
iproute2-6.17.0/tc/tc_monitor.c:98:23: branch_false: ...to here
iproute2-6.17.0/tc/tc_monitor.c:98:23: throw: if ‘rtnl_from_file’ throws an exception...
iproute2-6.17.0/tc/tc_monitor.c:98:23: danger: ‘fopen(file, "r")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   96|   		}
#   97|   
#   98|-> 		ret = rtnl_from_file(fp, accept_tcmsg, stdout);
#   99|   		fclose(fp);
#  100|   		return ret;

Error: CPPCHECK_WARNING (CWE-758): [#def296]
iproute2-6.17.0/tc/tc_red.c:82: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   80|   
#   81|   	for (clog = 0; clog < 32; clog++) {
#   82|-> 		if (maxtime/(1<<clog) < 512)
#   83|   			break;
#   84|   	}

Error: CPPCHECK_WARNING (CWE-758): [#def297]
iproute2-6.17.0/tc/tc_red.c:90: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   88|   	sbuf[0] = 0;
#   89|   	for (i = 1; i < 255; i++) {
#   90|-> 		sbuf[i] = (i<<clog)*lW;
#   91|   		if (sbuf[i] > 31)
#   92|   			sbuf[i] = 31;

Error: CPPCHECK_WARNING (CWE-758): [#def298]
iproute2-6.17.0/tc/tc_util.c:279: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  277|   
#  278|   		for (i = 0; i < 32; i++) {
#  279|-> 			if ((1<<i) == cell) {
#  280|   				*cell_log = i;
#  281|   				return 0;

Error: CPPCHECK_WARNING (CWE-457): [#def299]
iproute2-6.17.0/vdpa/vdpa.c:927: error[uninitvar]: Uninitialized variable: attr->nla_type
#  925|   
#  926|   	mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) {
#  927|-> 		switch (attr->nla_type) {
#  928|   		case VDPA_ATTR_DEV_NET_CFG_MAX_VQP:
#  929|   			max_vqp = mnl_attr_get_u16(attr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
iproute2-6.17.0/vdpa/vdpa.c:1103:24: warning[-Wanalyzer-malloc-leak]: leak of ‘vdpa’
iproute2-6.17.0/vdpa/vdpa.c:1098:29: acquire_memory: allocated here
iproute2-6.17.0/vdpa/vdpa.c:1100:12: branch_false: following ‘false’ branch (when ‘vdpa’ is non-NULL)...
iproute2-6.17.0/vdpa/vdpa.c:1103:24: branch_false: ...to here
iproute2-6.17.0/vdpa/vdpa.c:1103:24: throw: if ‘alloc_indent_mem’ throws an exception...
iproute2-6.17.0/vdpa/vdpa.c:1103:24: danger: ‘vdpa’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1101|   		return NULL;
# 1102|   
# 1103|-> 	vdpa->indent = alloc_indent_mem();
# 1104|   	if (!vdpa->indent)
# 1105|   		goto indent_err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
iproute2-6.17.0/vdpa/vdpa.c:1116:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vdpa_alloc()’
iproute2-6.17.0/vdpa/vdpa.c:1120:5: enter_function: entry to ‘main’
iproute2-6.17.0/vdpa/vdpa.c:1134:16: call_function: calling ‘vdpa_alloc’ from ‘main’
iproute2-6.17.0/vdpa/vdpa.c:1134:16: return_function: returning to ‘main’ from ‘vdpa_alloc’
iproute2-6.17.0/vdpa/vdpa.c:1135:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/vdpa/vdpa.c:1135:12: branch_false: ...to here
iproute2-6.17.0/vdpa/vdpa.c:1140:16: branch_true: following ‘true’ branch (when ‘opt >= 0’)...
iproute2-6.17.0/vdpa/vdpa.c:1141:17: branch_true: ...to here
iproute2-6.17.0/vdpa/vdpa.c:1184:9: call_function: calling ‘vdpa_free’ from ‘main’
# 1114|   static void vdpa_free(struct vdpa *vdpa)
# 1115|   {
# 1116|-> 	free_indent_mem(vdpa->indent);
# 1117|   	free(vdpa);
# 1118|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
iproute2-6.17.0/vdpa/vdpa.c:1164:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vdpa_alloc()’
iproute2-6.17.0/vdpa/vdpa.c:1120:5: enter_function: entry to ‘main’
iproute2-6.17.0/vdpa/vdpa.c:1134:16: call_function: calling ‘vdpa_alloc’ from ‘main’
iproute2-6.17.0/vdpa/vdpa.c:1134:16: return_function: returning to ‘main’ from ‘vdpa_alloc’
iproute2-6.17.0/vdpa/vdpa.c:1135:12: branch_false: following ‘false’ branch...
iproute2-6.17.0/vdpa/vdpa.c:1135:12: branch_false: ...to here
iproute2-6.17.0/vdpa/vdpa.c:1140:16: branch_false: following ‘false’ branch (when ‘opt < 0’)...
iproute2-6.17.0/vdpa/vdpa.c:1164:14: branch_false: ...to here
iproute2-6.17.0/vdpa/vdpa.c:1167:15: call_function: calling ‘vdpa_init’ from ‘main’
# 1162|   	}
# 1163|   
# 1164|-> 	argc -= optind;
# 1165|   	argv += optind;
# 1166|   

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-212.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-nameiproute-6.17.0-1.fc44
store-results-to/tmp/tmpv90susxe/iproute-6.17.0-1.fc44.tar.xz
time-created2026-01-08 17:09:25
time-finished2026-01-08 17:12:01
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpv90susxe/iproute-6.17.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpv90susxe/iproute-6.17.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9