Task #91450 - fixed.err

back to task #91450
download
Error: COMPILER_WARNING:
libnl-3.11.0/lib/route/cls/ematch_syntax.c: scope_hint: In function 'ematch_parse'
libnl-3.11.0/lib/route/cls/ematch_syntax.c:72:25: warning[-Wunused-but-set-variable=]: variable 'ematch_nerrs' set but not used
#   72 | #define yynerrs         ematch_nerrs
#      |                         ^~~~~~~~~~~~
libnl-3.11.0/lib/route/cls/ematch_syntax.c:1368:9: note: in expansion of macro 'yynerrs'
# 1368 |     int yynerrs = 0;
#      |         ^~~~~~~
#   70|   #define yyerror         ematch_error
#   71|   #define yydebug         ematch_debug
#   72|-> #define yynerrs         ematch_nerrs
#   73|   
#   74|   /* First part of user prologue.  */

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: warning[-Wanalyzer-malloc-leak]: leak of 'mpls_encap'
libnl-3.11.0/lib/route/nh_encap_mpls.c:111:12: branch_false: following 'false' branch (when 'addr' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:115:12: branch_false: following 'false' branch (when 'rtnh_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: acquire_memory: allocated here
libnl-3.11.0/lib/route/nh_encap_mpls.c:119:12: branch_false: following 'false' branch (when 'mpls_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: throw: if 'nl_addr_get' throws an exception...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: danger: 'mpls_encap' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  122|   	}
#  123|   
#  124|-> 	mpls_encap->dst = nl_addr_get(addr);
#  125|   	mpls_encap->ttl = ttl;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: warning[-Wanalyzer-malloc-leak]: leak of 'rtnh_encap'
libnl-3.11.0/lib/route/nh_encap_mpls.c:111:12: branch_false: following 'false' branch (when 'addr' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: acquire_memory: allocated here
libnl-3.11.0/lib/route/nh_encap_mpls.c:115:12: branch_false: following 'false' branch (when 'rtnh_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:119:12: branch_false: following 'false' branch (when 'mpls_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: throw: if 'nl_addr_get' throws an exception...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: danger: 'rtnh_encap' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  122|   	}
#  123|   
#  124|-> 	mpls_encap->dst = nl_addr_get(addr);
#  125|   	mpls_encap->ttl = ttl;
#  126|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: warning[-Wanalyzer-malloc-leak]: leak of 'mpls_encap'
libnl-3.11.0/lib/route/nh_encap_mpls.c:111:12: branch_false: following 'false' branch (when 'addr' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:115:12: branch_false: following 'false' branch (when 'rtnh_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: acquire_memory: allocated here
libnl-3.11.0/lib/route/nh_encap_mpls.c:119:12: branch_false: following 'false' branch (when 'mpls_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: throw: if 'nh_set_encap' throws an exception...
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: danger: 'mpls_encap' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  128|   	rtnh_encap->ops = &mpls_encap_ops;
#  129|   
#  130|-> 	nh_set_encap(nh, rtnh_encap);
#  131|   
#  132|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: warning[-Wanalyzer-malloc-leak]: leak of 'rtnh_encap'
libnl-3.11.0/lib/route/nh_encap_mpls.c:111:12: branch_false: following 'false' branch (when 'addr' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:114:22: acquire_memory: allocated here
libnl-3.11.0/lib/route/nh_encap_mpls.c:115:12: branch_false: following 'false' branch (when 'rtnh_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:118:22: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:119:12: branch_false: following 'false' branch (when 'mpls_encap' is non-NULL)...
libnl-3.11.0/lib/route/nh_encap_mpls.c:124:27: branch_false: ...to here
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: throw: if 'nh_set_encap' throws an exception...
libnl-3.11.0/lib/route/nh_encap_mpls.c:130:9: danger: 'rtnh_encap' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  128|   	rtnh_encap->ops = &mpls_encap_ops;
#  129|   
#  130|-> 	nh_set_encap(nh, rtnh_encap);
#  131|   
#  132|   	return 0;

Error: COMPILER_WARNING:
libnl-3.11.0/lib/route/pktloc_syntax.c: scope_hint: In function 'pktloc_parse'
libnl-3.11.0/lib/route/pktloc_syntax.c:72:25: warning[-Wunused-but-set-variable=]: variable 'pktloc_nerrs' set but not used
#   72 | #define yynerrs         pktloc_nerrs
#      |                         ^~~~~~~~~~~~
libnl-3.11.0/lib/route/pktloc_syntax.c:1236:9: note: in expansion of macro 'yynerrs'
# 1236 |     int yynerrs = 0;
#      |         ^~~~~~~
#   70|   #define yyerror         pktloc_error
#   71|   #define yydebug         pktloc_debug
#   72|-> #define yynerrs         pktloc_nerrs
#   73|   
#   74|   /* First part of user prologue.  */

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:106:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:106:27: throw: if ‘nl_cli_print_version’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:106:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  104|   		case 'q': quiet = 1; break;
#  105|   		case 'h': print_usage(); break;
#  106|-> 		case 'v': nl_cli_print_version(); break;
#  107|   		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  108|   		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:107:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:107:27: throw: if ‘nl_cli_tc_parse_dev’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:107:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  105|   		case 'h': print_usage(); break;
#  106|   		case 'v': nl_cli_print_version(); break;
#  107|-> 		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  108|   		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
#  109|   		case 'i': id = strdup(optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:108:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:108:27: throw: if ‘nl_cli_tc_parse_parent’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:108:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  106|   		case 'v': nl_cli_print_version(); break;
#  107|   		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  108|-> 		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
#  109|   		case 'i': id = strdup(optarg); break;
#  110|   		case ARG_UPDATE: flags = NLM_F_CREATE; break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:112:31: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:112:31: throw: if ‘nl_cli_tc_parse_mtu’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:112:31: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  110|   		case ARG_UPDATE: flags = NLM_F_CREATE; break;
#  111|   		case ARG_UPDATE_ONLY: flags = 0; break;
#  112|-> 		case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break;
#  113|   		case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
#  114|   		case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:113:31: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:113:31: throw: if ‘nl_cli_tc_parse_mpu’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:113:31: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  111|   		case ARG_UPDATE_ONLY: flags = 0; break;
#  112|   		case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break;
#  113|-> 		case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
#  114|   		case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
#  115|   		case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:114:36: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:114:36: throw: if ‘nl_cli_tc_parse_overhead’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:114:36: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  112|   		case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break;
#  113|   		case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
#  114|-> 		case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
#  115|   		case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;
#  116|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:115:36: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:115:36: throw: if ‘nl_cli_tc_parse_linktype’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:115:36: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  113|   		case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
#  114|   		case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
#  115|-> 		case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;
#  116|   		}
#  117|   	}

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:122:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-class-add.c:153:1: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:119:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:122:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:122:14: throw: if ‘rtnl_tc_get_ifindex’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:122:14: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  120|   		print_usage();
#  121|   
#  122|-> 	if (!rtnl_tc_get_ifindex(tc))
#  123|   		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  124|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:123:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-class-add.c:153:1: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:119:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:122:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:122:12: branch_true: following ‘true’ branch...
libnl-3.11.0/src/nl-class-add.c:123:17: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:123:17: throw: if ‘nl_cli_fatal’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:123:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  121|   
#  122|   	if (!rtnl_tc_get_ifindex(tc))
#  123|-> 		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  124|   
#  125|   	if (!rtnl_tc_get_parent(tc))

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:125:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-class-add.c:153:1: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:119:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:122:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:122:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:125:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:125:14: throw: if ‘rtnl_tc_get_parent’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:125:14: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  123|   		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  124|   
#  125|-> 	if (!rtnl_tc_get_parent(tc))
#  126|   		nl_cli_fatal(EINVAL, "You must specify a parent (--parent=XXX)");
#  127|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:126:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-class-add.c:153:1: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:119:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:122:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:122:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:125:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:125:12: branch_true: following ‘true’ branch...
libnl-3.11.0/src/nl-class-add.c:126:17: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:126:17: throw: if ‘nl_cli_fatal’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:126:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  124|   
#  125|   	if (!rtnl_tc_get_parent(tc))
#  126|-> 		nl_cli_fatal(EINVAL, "You must specify a parent (--parent=XXX)");
#  127|   
#  128|   	if (id) {

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-class-add.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-class-add.c:100:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-class-add.c:103:17: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:109:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-class-add.c:100:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-class-add.c:153:1: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:119:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:122:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:122:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:125:14: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:125:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-class-add.c:128:12: branch_false: ...to here
libnl-3.11.0/src/nl-class-add.c:128:12: branch_true: following ‘true’ branch (when ‘id’ is non-NULL)...
libnl-3.11.0/src/nl-class-add.c:129:17: branch_true: ...to here
libnl-3.11.0/src/nl-class-add.c:129:17: throw: if ‘nl_cli_tc_parse_handle’ throws an exception...
libnl-3.11.0/src/nl-class-add.c:129:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  127|   
#  128|   	if (id) {
#  129|-> 		nl_cli_tc_parse_handle(tc, id, 1);
#  130|   		free(id);
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:99:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:99:27: throw: if ‘nl_cli_print_version’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:99:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   97|   		case 'q': quiet = 1; break;
#   98|   		case 'h': print_usage(); break;
#   99|-> 		case 'v': nl_cli_print_version(); break;
#  100|   		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  101|   		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:100:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:100:27: throw: if ‘nl_cli_tc_parse_dev’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:100:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   98|   		case 'h': print_usage(); break;
#   99|   		case 'v': nl_cli_print_version(); break;
#  100|-> 		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  101|   		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
#  102|   		case 'i': id = strdup(optarg); break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:101:27: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:101:27: throw: if ‘nl_cli_tc_parse_parent’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:101:27: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   99|   		case 'v': nl_cli_print_version(); break;
#  100|   		case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
#  101|-> 		case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
#  102|   		case 'i': id = strdup(optarg); break;
#  103|   		case ARG_UPDATE: flags = NLM_F_CREATE; break;

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:113:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:144:1: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:110:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:113:14: throw: if ‘rtnl_tc_get_ifindex’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  111|   		print_usage();
#  112|   
#  113|-> 	if (!rtnl_tc_get_ifindex(tc))
#  114|   		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  115|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:114:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:144:1: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:110:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:113:12: branch_true: following ‘true’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:114:17: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:114:17: throw: if ‘nl_cli_fatal’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:114:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  112|   
#  113|   	if (!rtnl_tc_get_ifindex(tc))
#  114|-> 		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  115|   
#  116|   	if (!rtnl_tc_get_parent(tc))

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:116:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:144:1: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:110:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:113:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:116:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:116:14: throw: if ‘rtnl_tc_get_parent’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:116:14: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  114|   		nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
#  115|   
#  116|-> 	if (!rtnl_tc_get_parent(tc))
#  117|   		nl_cli_fatal(EINVAL, "You must specify a parent");
#  118|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:117:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:144:1: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:110:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:113:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:116:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:116:12: branch_true: following ‘true’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:117:17: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:117:17: throw: if ‘nl_cli_fatal’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:117:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  115|   
#  116|   	if (!rtnl_tc_get_parent(tc))
#  117|-> 		nl_cli_fatal(EINVAL, "You must specify a parent");
#  118|   
#  119|   	if (id) {

Error: GCC_ANALYZER_WARNING (CWE-401):
libnl-3.11.0/src/nl-qdisc-add.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id’
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:96:17: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:102:32: acquire_memory: allocated here
libnl-3.11.0/src/nl-qdisc-add.c:93:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
libnl-3.11.0/src/nl-qdisc-add.c:144:1: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:110:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:113:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:113:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:116:14: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:116:12: branch_false: following ‘false’ branch...
libnl-3.11.0/src/nl-qdisc-add.c:119:12: branch_false: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:119:12: branch_true: following ‘true’ branch (when ‘id’ is non-NULL)...
libnl-3.11.0/src/nl-qdisc-add.c:120:17: branch_true: ...to here
libnl-3.11.0/src/nl-qdisc-add.c:120:17: throw: if ‘nl_cli_tc_parse_handle’ throws an exception...
libnl-3.11.0/src/nl-qdisc-add.c:120:17: danger: ‘id’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  118|   
#  119|   	if (id) {
#  120|-> 		nl_cli_tc_parse_handle(tc, id, 1);
#  121|   		free(id);
#  122|   	}