nfs-utils-2.8.4-0.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-127): [#def1]
nfs-utils-2.8.4/support/export/auth.c:317:31: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
nfs-utils-2.8.4/support/export/auth.c:232:1: enter_function: entry to ‘auth_authenticate’
nfs-utils-2.8.4/support/export/auth.c:242:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/auth.c:248:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/auth.c:250:9: call_function: calling ‘auth_fixpath’ from ‘auth_authenticate’
#  315|   			*cp++ = *sp;
#  316|   	}
#  317|-> 	while (cp > path+1 && cp[-1] == '/')
#  318|   		cp--;
#  319|   	*cp = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
nfs-utils-2.8.4/support/export/cache.c:67:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1824:1: enter_function: entry to ‘cache_get_filehandle’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1841:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1841:46: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1841:26: call_function: inlined call to ‘cache_write’ from ‘cache_get_filehandle’
#   65|   static ssize_t cache_write(int fd, void *buf, size_t len)
#   66|   {
#   67|-> 	return nfsd_path_write(fd, buf, len);
#   68|   }
#   69|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
nfs-utils-2.8.4/support/export/cache.c:473:13: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
#  471|   
#  472|   	/* This process should have the CAP_DAC_READ_SEARCH capability */
#  473|-> 	if (nfsd_name_to_handle_at(AT_FDCWD, child, &fchild.fh, &mnt_child, 0) < 0)
#  474|   		return -1;
#  475|   	if (nfsd_name_to_handle_at(AT_FDCWD, parent, &fparent.fh, &mnt_parent, 0) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
nfs-utils-2.8.4/support/export/cache.c:475:13: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
#  473|   	if (nfsd_name_to_handle_at(AT_FDCWD, child, &fchild.fh, &mnt_child, 0) < 0)
#  474|   		return -1;
#  475|-> 	if (nfsd_name_to_handle_at(AT_FDCWD, parent, &fparent.fh, &mnt_parent, 0) < 0) {
#  476|   		/* If the child resolved, but the parent did not, they differ */
#  477|   		if (path_lookup_error(errno))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
nfs-utils-2.8.4/support/export/cache.c:508:13: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
#  506|   	 * could give a false positive
#  507|   	 */
#  508|-> 	if (nfsd_path_lstat(child, &sc) != 0)
#  509|   		return 0;
#  510|   	if (nfsd_path_lstat(parent, &sp) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
nfs-utils-2.8.4/support/export/cache.c:510:13: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
#  508|   	if (nfsd_path_lstat(child, &sc) != 0)
#  509|   		return 0;
#  510|-> 	if (nfsd_path_lstat(parent, &sp) != 0)
#  511|   		return 0;
#  512|   	if (sc.st_dev != sp.st_dev)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
nfs-utils-2.8.4/support/export/cache.c:570:43: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
#  568|   export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
#  569|   {
#  570|-> 	return path_matches(exp, path) && client_matches(exp, dom, ai);
#  571|   }
#  572|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
nfs-utils-2.8.4/support/export/cache.c:792:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dom’
nfs-utils-2.8.4/support/export/cache.c:1665:5: enter_function: entry to ‘cache_process’
nfs-utils-2.8.4/support/export/cache.c:1691:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1692:30: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1695:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1696:35: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1698:25: call_function: calling ‘nfsd_retry_fh’ from ‘cache_process’
#  790|   	if (dom == NULL)
#  791|   		return ret;
#  792|-> 	if (qword_get(&bp, dom, blen) <= 0)
#  793|   		goto out;
#  794|   	if (qword_get_int(&bp, &fsidtype) != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
nfs-utils-2.8.4/support/export/cache.c:1234:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
# 1232|   		goto out_default;
# 1233|   	}
# 1234|-> 	xlog(D_CALL, "%s: pathname = '%s'", __func__, pathname);
# 1235|   
# 1236|   again:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
nfs-utils-2.8.4/support/export/cache.c:1240:17: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
# 1238|   	slash = strrchr(parent, '/');
# 1239|   	if (slash == NULL) {
# 1240|-> 		xlog(D_GENERAL, "%s: no slash found in pathname",
# 1241|   			__func__);
# 1242|   		goto out_default;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
nfs-utils-2.8.4/support/export/cache.c:1257:17: warning[-Wanalyzer-malloc-leak]: leak of ‘parent’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1470:18: return_function: returning to ‘lookup_junction’ from ‘nfs_get_basic_junction’
nfs-utils-2.8.4/support/export/cache.c:1471:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1477:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1477:18: call_function: calling ‘lookup_parent_export’ from ‘lookup_junction’
# 1255|   	result = lookup_export(dom, parent, ai);
# 1256|   	if (result == NULL) {
# 1257|-> 		xlog(D_GENERAL, "%s: lookup_export(%s) found nothing",
# 1258|   			__func__, parent);
# 1259|   		goto again;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
nfs-utils-2.8.4/support/export/cache.c:1443:18: warning[-Wanalyzer-malloc-leak]: leak of ‘new’
nfs-utils-2.8.4/support/export/cache.c:1456:26: enter_function: entry to ‘lookup_junction’
nfs-utils-2.8.4/support/export/cache.c:1465:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1470:18: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1470:18: call_function: calling ‘nfs_get_basic_junction’ from ‘lookup_junction’
# 1441|   		return ENOMEM;
# 1442|   
# 1443|-> 	retval = nfs_get_locations(junct_path, &new->ns_list);
# 1444|   	if (retval) {
# 1445|   		nfs_free_locations(new->ns_list);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
nfs-utils-2.8.4/support/export/cache.c:1542:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dom’
nfs-utils-2.8.4/support/export/cache.c:1530:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1536:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/cache.c:1539:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1542:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1542:13: throw: if ‘qword_get’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1542:13: danger: ‘dom’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 1540|   		goto out;
# 1541|   
# 1542|-> 	if (qword_get(&bp, dom, blen) <= 0)
# 1543|   		goto out;
# 1544|   	if (qword_get(&bp, path, blen) <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
nfs-utils-2.8.4/support/export/cache.c:1542:13: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
nfs-utils-2.8.4/support/export/cache.c:1530:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1537:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/cache.c:1539:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1542:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1542:13: throw: if ‘qword_get’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1542:13: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 1540|   		goto out;
# 1541|   
# 1542|-> 	if (qword_get(&bp, dom, blen) <= 0)
# 1543|   		goto out;
# 1544|   	if (qword_get(&bp, path, blen) <= 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
nfs-utils-2.8.4/support/export/cache.c:1544:13: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
nfs-utils-2.8.4/support/export/cache.c:1530:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1537:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/cache.c:1539:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1542:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1542:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1544:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1544:13: throw: if ‘qword_get’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1544:13: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 1542|   	if (qword_get(&bp, dom, blen) <= 0)
# 1543|   		goto out;
# 1544|-> 	if (qword_get(&bp, path, blen) <= 0)
# 1545|   		goto out;
# 1546|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
nfs-utils-2.8.4/support/export/cache.c:1590:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dom’
nfs-utils-2.8.4/support/export/cache.c:1530:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1536:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/cache.c:1539:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1540:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1590:9: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1590:9: danger: ‘dom’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 1588|   
# 1589|    out:
# 1590|-> 	xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
# 1591|   	if (dom) free(dom);
# 1592|   	if (path) free(path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
nfs-utils-2.8.4/support/export/cache.c:1590:9: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
nfs-utils-2.8.4/support/export/cache.c:1530:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1537:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/cache.c:1539:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1540:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1590:9: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1590:9: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 1588|   
# 1589|    out:
# 1590|-> 	xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
# 1591|   	if (dom) free(dom);
# 1592|   	if (path) free(path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
nfs-utils-2.8.4/support/export/cache.c:1619:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 2)’
nfs-utils-2.8.4/support/export/cache.c:1619:19: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1621:21: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1624:34: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1619:19: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1621:21: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1624:34: throw: if ‘open’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1619:19: danger: ‘open(&path, 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 1617|   	int i;
# 1618|   
# 1619|-> 	for (i=0; cachelist[i].cache_name; i++ ) {
# 1620|   		char path[100];
# 1621|   		if (!manage_gids && cachelist[i].cache_handle == auth_unix_gid)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
nfs-utils-2.8.4/support/export/cache.c:1731:53: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/nfsd.export/channel", 1)’
nfs-utils-2.8.4/support/export/cache.c:1724:12: enter_function: entry to ‘cache_export_ent’
nfs-utils-2.8.4/support/export/cache.c:1728:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1729:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1731:53: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1731:15: call_function: calling ‘dump_to_cache’ from ‘cache_export_ent’
# 1729|   	if (f < 0) return -1;
# 1730|   
# 1731|-> 	err = dump_to_cache(f, buf, buflen, domain, exp->e_path, exp, 0);
# 1732|   	if (err) {
# 1733|   		xlog(L_WARNING,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
nfs-utils-2.8.4/support/export/cache.c:1798:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’
nfs-utils-2.8.4/support/export/cache.c:1793:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1794:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1797:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1798:9: throw: if ‘qword_add’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1798:9: danger: ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 1796|   
# 1797|   	bp = buf, blen = sizeof(buf);
# 1798|-> 	qword_add(&bp, &blen, "nfsd");
# 1799|   	qword_add(&bp, &blen, host_ntop(get_addrlist(exp->m_client, 0), ip, sizeof(ip)));
# 1800|   	qword_adduint(&bp, &blen, time(0) + exp->m_export.e_ttl);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
nfs-utils-2.8.4/support/export/cache.c:1799:54: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’
nfs-utils-2.8.4/support/export/cache.c:1793:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1794:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1797:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1799:9: throw: if ‘host_ntop’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1799:54: danger: ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
# 1797|   	bp = buf, blen = sizeof(buf);
# 1798|   	qword_add(&bp, &blen, "nfsd");
# 1799|-> 	qword_add(&bp, &blen, host_ntop(get_addrlist(exp->m_client, 0), ip, sizeof(ip)));
# 1800|   	qword_adduint(&bp, &blen, time(0) + exp->m_export.e_ttl);
# 1801|   	qword_add(&bp, &blen, exp->m_client->m_hostname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
nfs-utils-2.8.4/support/export/cache.c:1837:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1837:9: throw: if ‘qword_add’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1837:9: danger: ‘f’ leaks here; was opened at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 1835|   
# 1836|   	bp = buf, blen = sizeof(buf);
# 1837|-> 	qword_add(&bp, &blen, exp->m_client->m_hostname);
# 1838|   	qword_add(&bp, &blen, p);
# 1839|   	qword_addint(&bp, &blen, len);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
nfs-utils-2.8.4/support/export/cache.c:1838:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1838:9: throw: if ‘qword_add’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1838:9: danger: ‘f’ leaks here; was opened at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
# 1836|   	bp = buf, blen = sizeof(buf);
# 1837|   	qword_add(&bp, &blen, exp->m_client->m_hostname);
# 1838|-> 	qword_add(&bp, &blen, p);
# 1839|   	qword_addint(&bp, &blen, len);
# 1840|   	qword_addeol(&bp, &blen);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
nfs-utils-2.8.4/support/export/cache.c:1839:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1839:9: throw: if ‘qword_addint’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1839:9: danger: ‘f’ leaks here; was opened at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
# 1837|   	qword_add(&bp, &blen, exp->m_client->m_hostname);
# 1838|   	qword_add(&bp, &blen, p);
# 1839|-> 	qword_addint(&bp, &blen, len);
# 1840|   	qword_addeol(&bp, &blen);
# 1841|   	if (blen <= 0 || cache_write(f, buf, bp - buf) != bp - buf) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
nfs-utils-2.8.4/support/export/cache.c:1840:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1840:9: throw: if ‘qword_addeol’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1840:9: danger: ‘f’ leaks here; was opened at [(1)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/0)
# 1838|   	qword_add(&bp, &blen, p);
# 1839|   	qword_addint(&bp, &blen, len);
# 1840|-> 	qword_addeol(&bp, &blen);
# 1841|   	if (blen <= 0 || cache_write(f, buf, bp - buf) != bp - buf) {
# 1842|   		close(f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
nfs-utils-2.8.4/support/export/cache.c:1842:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘f’
nfs-utils-2.8.4/support/export/cache.c:1830:13: acquire_resource: opened here
nfs-utils-2.8.4/support/export/cache.c:1831:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/cache.c:1836:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/cache.c:1841:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/cache.c:1842:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/cache.c:1842:17: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/support/export/cache.c:1842:17: danger: ‘f’ leaks here; was opened at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
# 1840|   	qword_addeol(&bp, &blen);
# 1841|   	if (blen <= 0 || cache_write(f, buf, bp - buf) != bp - buf) {
# 1842|-> 		close(f);
# 1843|   		return NULL;
# 1844|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
nfs-utils-2.8.4/support/export/export.c:466:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/nfsd.export/channel", 1)’
nfs-utils-2.8.4/support/export/export.c:460:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/export.c:462:9: branch_false: ...to here
nfs-utils-2.8.4/support/export/export.c:463:14: acquire_resource: opened here
nfs-utils-2.8.4/support/export/export.c:464:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/export.c:466:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/export.c:466:13: throw: if ‘nfsd_path_write’ throws an exception...
nfs-utils-2.8.4/support/export/export.c:466:13: danger: ‘open("/proc/net/rpc/nfsd.export/channel", 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  464|   	if (fd < 0)
#  465|   		return 0;
#  466|-> 	n = nfsd_path_write(fd, buf, strlen(buf));
#  467|   	close(fd);
#  468|   	if (n < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
nfs-utils-2.8.4/support/export/fsloc.c:46:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rv’
nfs-utils-2.8.4/support/export/fsloc.c:164:17: enter_function: entry to ‘replicas_lookup’
nfs-utils-2.8.4/support/export/fsloc.c:171:22: call_function: calling ‘method_list’ from ‘replicas_lookup’
#   44|   		return;
#   45|   	}
#   46|-> 	xlog(L_NOTICE, "replicas listsize=%i", sp->h_num);
#   47|   	for (i=0; i<sp->h_num; i++) {
#   48|   		xlog(L_NOTICE, "    %s:%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
nfs-utils-2.8.4/support/export/fsloc.c:136:17: warning[-Wanalyzer-malloc-leak]: leak of ‘copy’
nfs-utils-2.8.4/support/export/fsloc.c:164:17: enter_function: entry to ‘replicas_lookup’
nfs-utils-2.8.4/support/export/fsloc.c:171:22: call_function: calling ‘method_list’ from ‘replicas_lookup’
#  134|   	copy = strdup(data);
#  135|   	if (copy)
#  136|-> 		xlog(L_NOTICE, "converted to %s", copy);
#  137|   	if (list && copy) {
#  138|   		ptr = copy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
nfs-utils-2.8.4/support/export/fsloc.c:136:17: warning[-Wanalyzer-malloc-leak]: leak of ‘list’
nfs-utils-2.8.4/support/export/fsloc.c:164:17: enter_function: entry to ‘replicas_lookup’
nfs-utils-2.8.4/support/export/fsloc.c:171:22: call_function: calling ‘method_list’ from ‘replicas_lookup’
#  134|   	copy = strdup(data);
#  135|   	if (copy)
#  136|-> 		xlog(L_NOTICE, "converted to %s", copy);
#  137|   	if (list && copy) {
#  138|   		ptr = copy;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
nfs-utils-2.8.4/support/export/v4clients.c:98:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.4/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#   96|   		ret[e-line] = 0;
#   97|   	}
#   98|-> 	return ret;
#   99|   }
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
nfs-utils-2.8.4/support/export/v4clients.c:98:16: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
nfs-utils-2.8.4/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.4/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#   96|   		ret[e-line] = 0;
#   97|   	}
#   98|-> 	return ret;
#   99|   }
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
nfs-utils-2.8.4/support/export/v4clients.c:164:15: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
nfs-utils-2.8.4/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.4/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#  162|   	key->wid = -1;
#  163|   
#  164|-> 	ent = tsearch(key, &tree_root, ent_cmp);
#  165|   
#  166|   	if (!ent || *ent != key)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
nfs-utils-2.8.4/support/export/v4clients.c:171:1: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
nfs-utils-2.8.4/support/export/v4clients.c:204:5: enter_function: entry to ‘v4clients_process’
nfs-utils-2.8.4/support/export/v4clients.c:211:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:212:14: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:211:13: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:215:16: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:224:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/v4clients.c:225:33: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4clients.c:225:33: call_function: calling ‘add_id’ from ‘v4clients_process’
#  169|   	else
#  170|   		read_info(key);
#  171|-> }
#  172|   
#  173|   static void del_id(unsigned long id)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
nfs-utils-2.8.4/support/export/v4root.c:72:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#   70|   			continue;
#   71|   
#   72|-> 		i = secinfo_addflavor(flav, pseudo);
#   73|   		new = &pseudo->e_secinfo[i];
#   74|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
nfs-utils-2.8.4/support/export/v4root.c:89:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#   87|   	struct exportent *curexp = &export->m_export;
#   88|   
#   89|-> 	dupexportent(&eep, &pseudo_root.m_export);
#   90|   	eep.e_ttl = default_ttl;
#   91|   	eep.e_hostname = curexp->e_hostname;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
nfs-utils-2.8.4/support/export/v4root.c:97:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#   95|   
#   96|   	if (strcmp(path, "/") != 0 &&
#   97|-> 	    !export_test(&eep, 0)) {
#   98|   		/* Need a uuid - base it on path using a fixed seed that
#   99|   		 * was generated randomly.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
nfs-utils-2.8.4/support/export/v4root.c:106:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#  104|   		unsigned int i, j;
#  105|   
#  106|-> 		uuid_parse(seed_s, seed);
#  107|   		uuid_generate_sha1(uuid, seed, path, strlen(path));
#  108|   		uuid_unparse_upper(uuid, uuid_s);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
nfs-utils-2.8.4/support/export/v4root.c:107:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#  105|   
#  106|   		uuid_parse(seed_s, seed);
#  107|-> 		uuid_generate_sha1(uuid, seed, path, strlen(path));
#  108|   		uuid_unparse_upper(uuid, uuid_s);
#  109|   		/* strip hyhens */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
nfs-utils-2.8.4/support/export/v4root.c:108:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#  106|   		uuid_parse(seed_s, seed);
#  107|   		uuid_generate_sha1(uuid, seed, path, strlen(path));
#  108|-> 		uuid_unparse_upper(uuid, uuid_s);
#  109|   		/* strip hyhens */
#  110|   		for (i = j = 0; uuid_s[i]; i++)

Error: CPPCHECK_WARNING (CWE-562): [#def41]
nfs-utils-2.8.4/support/export/v4root.c:115: error[invalidLifetime]: Using object that points to local variable 'uuid_s' that is out of scope.
#  113|   		eep.e_uuid = uuid_s;
#  114|   	}
#  115|-> 	set_pseudofs_security(&eep);
#  116|   	exp = export_create(&eep, 0);
#  117|   	if (exp == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
nfs-utils-2.8.4/support/export/v4root.c:151:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
nfs-utils-2.8.4/support/export/v4root.c:167:12: enter_function: entry to ‘v4root_add_parents’
nfs-utils-2.8.4/support/export/v4root.c:174:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:175:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:180:26: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/support/export/v4root.c:183:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/v4root.c:185:23: branch_false: ...to here
nfs-utils-2.8.4/support/export/v4root.c:185:23: call_function: calling ‘pseudofs_update’ from ‘v4root_add_parents’
#  149|   	nfs_export *exp;
#  150|   
#  151|-> 	exp = export_lookup(hostname, path, 0);
#  152|   	if (exp && !(exp->m_export.e_flags & NFSEXP_V4ROOT))
#  153|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
nfs-utils-2.8.4/support/export/xtab.c:156:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(newfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:153:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:156:15: throw: if ‘open’ throws an exception...
nfs-utils-2.8.4/support/export/xtab.c:156:15: danger: ‘open(newfile, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  154|   	if (nfd < 0)
#  155|   		return;
#  156|-> 	ofd = open(oldfile, 0);
#  157|   	if (ofd < 0) {
#  158|   		close(nfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
nfs-utils-2.8.4/support/export/xtab.c:158:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(newfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:153:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/export/xtab.c:158:17: branch_true: ...to here
nfs-utils-2.8.4/support/export/xtab.c:158:17: danger: ‘open(newfile, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  156|   	ofd = open(oldfile, 0);
#  157|   	if (ofd < 0) {
#  158|-> 		close(nfd);
#  159|   		rename(newfile, oldfile);
#  160|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
nfs-utils-2.8.4/support/export/xtab.c:173:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(newfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:153:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:165:20: branch_false: following ‘false’ branch (when ‘ncnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:167:24: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:168:20: branch_false: following ‘false’ branch (when ‘ocnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: following ‘false’ branch (when ‘ncnt == ocnt’)...
nfs-utils-2.8.4/support/export/xtab.c:172:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:173:25: danger: ‘open(newfile, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  171|   			break;
#  172|   		if (ncnt == 0) {
#  173|-> 			close(nfd);
#  174|   			close(ofd);
#  175|   			unlink(newfile);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
nfs-utils-2.8.4/support/export/xtab.c:173:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(oldfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:156:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:165:20: branch_false: following ‘false’ branch (when ‘ncnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:167:24: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:168:20: branch_false: following ‘false’ branch (when ‘ocnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: following ‘false’ branch (when ‘ncnt == ocnt’)...
nfs-utils-2.8.4/support/export/xtab.c:172:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:173:25: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/support/export/xtab.c:173:25: danger: ‘open(oldfile, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  171|   			break;
#  172|   		if (ncnt == 0) {
#  173|-> 			close(nfd);
#  174|   			close(ofd);
#  175|   			unlink(newfile);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
nfs-utils-2.8.4/support/export/xtab.c:174:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(oldfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:156:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:165:20: branch_false: following ‘false’ branch (when ‘ncnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:167:24: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:168:20: branch_false: following ‘false’ branch (when ‘ocnt >= 0’)...
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:170:20: branch_false: following ‘false’ branch (when ‘ncnt == ocnt’)...
nfs-utils-2.8.4/support/export/xtab.c:172:20: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:174:25: danger: ‘open(oldfile, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  172|   		if (ncnt == 0) {
#  173|   			close(nfd);
#  174|-> 			close(ofd);
#  175|   			unlink(newfile);
#  176|   			return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
nfs-utils-2.8.4/support/export/xtab.c:181:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(newfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:153:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:181:9: danger: ‘open(newfile, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  179|   
#  180|   	/* some mis-match */
#  181|-> 	close(nfd);
#  182|   	close(ofd);
#  183|   	rename(newfile, oldfile);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
nfs-utils-2.8.4/support/export/xtab.c:181:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(oldfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:156:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:181:9: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/support/export/xtab.c:181:9: danger: ‘open(oldfile, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  179|   
#  180|   	/* some mis-match */
#  181|-> 	close(nfd);
#  182|   	close(ofd);
#  183|   	rename(newfile, oldfile);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
nfs-utils-2.8.4/support/export/xtab.c:182:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(oldfile, 0)’
nfs-utils-2.8.4/support/export/xtab.c:154:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:156:15: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:156:15: acquire_resource: opened here
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/xtab.c:157:12: branch_false: ...to here
nfs-utils-2.8.4/support/export/xtab.c:182:9: danger: ‘open(oldfile, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  180|   	/* some mis-match */
#  181|   	close(nfd);
#  182|-> 	close(ofd);
#  183|   	rename(newfile, oldfile);
#  184|   	return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
nfs-utils-2.8.4/support/include/sockaddr.h:77:17: warning[-Wanalyzer-malloc-leak]: leak of ‘host_canonname(sap)’
nfs-utils-2.8.4/support/export/hostname.c:275:1: enter_function: entry to ‘host_reliable_addrinfo’
nfs-utils-2.8.4/support/export/hostname.c:281:20: call_function: calling ‘host_canonname’ from ‘host_reliable_addrinfo’
nfs-utils-2.8.4/support/export/hostname.c:281:20: return_function: returning to ‘host_reliable_addrinfo’ from ‘host_canonname’
nfs-utils-2.8.4/support/export/hostname.c:282:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/export/hostname.c:285:14: branch_false: ...to here
nfs-utils-2.8.4/support/export/hostname.c:285:14: call_function: calling ‘host_addrinfo’ from ‘host_reliable_addrinfo’
#   75|   nfs_sockaddr_length(const struct sockaddr *sap)
#   76|   {
#   77|-> 	switch (sap->sa_family) {
#   78|   	case AF_INET:
#   79|   		return SIZEOF_SOCKADDR_IN;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
nfs-utils-2.8.4/support/junction/export-cache.c:75:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(pathname, 2)'
nfs-utils-2.8.4/support/junction/export-cache.c:66:14: acquire_resource: opened here
nfs-utils-2.8.4/support/junction/export-cache.c:67:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/export-cache.c:75:15: branch_false: ...to here
nfs-utils-2.8.4/support/junction/export-cache.c:75:15: throw: if 'write' throws an exception...
nfs-utils-2.8.4/support/junction/export-cache.c:75:15: danger: 'open(pathname, 2)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   73|   	}
#   74|   
#   75|-> 	len = write(fd, flushtime, strlen(flushtime));
#   76|   	if (len != (ssize_t)strlen(flushtime)) {
#   77|   		xlog(D_GENERAL, "%s: Failed to write %s: %m",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
nfs-utils-2.8.4/support/junction/export-cache.c:76:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(pathname, 2)'
nfs-utils-2.8.4/support/junction/export-cache.c:66:14: acquire_resource: opened here
nfs-utils-2.8.4/support/junction/export-cache.c:67:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/export-cache.c:75:15: branch_false: ...to here
nfs-utils-2.8.4/support/junction/export-cache.c:76:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/junction/export-cache.c:77:17: branch_true: ...to here
nfs-utils-2.8.4/support/junction/export-cache.c:77:17: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/junction/export-cache.c:76:13: danger: 'open(pathname, 2)' leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   74|   
#   75|   	len = write(fd, flushtime, strlen(flushtime));
#   76|-> 	if (len != (ssize_t)strlen(flushtime)) {
#   77|   		xlog(D_GENERAL, "%s: Failed to write %s: %m",
#   78|   			__func__, pathname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
nfs-utils-2.8.4/support/junction/nfs.c:916:22: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:920:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:922:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:926:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:916:22: throw: if 'junction_xml_match_node_name' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  914|   	     component != NULL;
#  915|   	     component = component->next) {
#  916|-> 		if (!junction_xml_match_node_name(component,
#  917|   						NFS_XML_COMPONENT_TAG))
#  918|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
nfs-utils-2.8.4/support/junction/nfs.c:916:22: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:908:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:916:22: throw: if 'junction_xml_match_node_name' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: danger: 'result' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  914|   	     component != NULL;
#  915|   	     component = component->next) {
#  916|-> 		if (!junction_xml_match_node_name(component,
#  917|   						NFS_XML_COMPONENT_TAG))
#  918|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
nfs-utils-2.8.4/support/junction/nfs.c:919:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:920:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:922:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:926:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:919:25: throw: if 'xmlNodeGetContent' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:919:25: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  917|   						NFS_XML_COMPONENT_TAG))
#  918|   			continue;
#  919|-> 		value = xmlNodeGetContent(component);
#  920|   		result[count] = strdup((const char *)value);
#  921|   		xmlFree(value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
nfs-utils-2.8.4/support/junction/nfs.c:919:25: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:908:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:919:25: throw: if 'xmlNodeGetContent' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:919:25: danger: 'result' leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  917|   						NFS_XML_COMPONENT_TAG))
#  918|   			continue;
#  919|-> 		value = xmlNodeGetContent(component);
#  920|   		result[count] = strdup((const char *)value);
#  921|   		xmlFree(value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
nfs-utils-2.8.4/support/junction/nfs.c:921:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:920:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:921:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:921:17: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  919|   		value = xmlNodeGetContent(component);
#  920|   		result[count] = strdup((const char *)value);
#  921|-> 		xmlFree(value);
#  922|   		if (result[count] == NULL) {
#  923|   			nfs_free_string_array(result);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
nfs-utils-2.8.4/support/junction/nfs.c:921:17: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:908:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:921:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:921:17: danger: 'result' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  919|   		value = xmlNodeGetContent(component);
#  920|   		result[count] = strdup((const char *)value);
#  921|-> 		xmlFree(value);
#  922|   		if (result[count] == NULL) {
#  923|   			nfs_free_string_array(result);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
nfs-utils-2.8.4/support/junction/nfs.c:923:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:920:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:922:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:926:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:922:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/junction/nfs.c:923:25: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:923:25: throw: if 'nfs_free_string_array' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:923:25: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/10)
#  921|   		xmlFree(value);
#  922|   		if (result[count] == NULL) {
#  923|-> 			nfs_free_string_array(result);
#  924|   			return FEDFS_ERR_SVRFAULT;
#  925|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
nfs-utils-2.8.4/support/junction/nfs.c:923:25: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/nfs.c:878:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:882:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:889:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/nfs.c:894:17: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:899:12: branch_false: following 'false' branch (when 'count != 0')...
nfs-utils-2.8.4/support/junction/nfs.c:908:25: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:908:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/nfs.c:909:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:913:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:914:14: branch_true: following 'true' branch (when 'component' is non-NULL)...
nfs-utils-2.8.4/support/junction/nfs.c:916:22: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:922:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/junction/nfs.c:923:25: branch_true: ...to here
nfs-utils-2.8.4/support/junction/nfs.c:923:25: throw: if 'nfs_free_string_array' throws an exception...
nfs-utils-2.8.4/support/junction/nfs.c:923:25: danger: 'result' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  921|   		xmlFree(value);
#  922|   		if (result[count] == NULL) {
#  923|-> 			nfs_free_string_array(result);
#  924|   			return FEDFS_ERR_SVRFAULT;
#  925|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
nfs-utils-2.8.4/support/junction/path.c:116:17: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/path.c:217:1: enter_function: entry to 'nsdb_path_array_to_posix'
nfs-utils-2.8.4/support/junction/path.c:223:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/path.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:226:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/path.c:226:12: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:236:14: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/junction/path.c:239:23: branch_true: ...to here
nfs-utils-2.8.4/support/junction/path.c:241:20: branch_false: following 'false' branch (when 'len != 0')...
nfs-utils-2.8.4/support/junction/path.c:245:20: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:245:20: branch_false: following 'false' branch (when 'len <= 255')...
nfs-utils-2.8.4/support/junction/path.c:249:21: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:249:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/path.c:260:24: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:262:20: branch_false: following 'false' branch (when 'length <= 4096')...
nfs-utils-2.8.4/support/junction/path.c:237:14: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:268:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/junction/path.c:269:12: branch_false: following 'false' branch (when 'result' is non-NULL)...
nfs-utils-2.8.4/support/junction/path.c:269:12: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:272:21: branch_true: following 'true' branch (when 'i < count')...
nfs-utils-2.8.4/support/junction/path.c:273:17: branch_true: ...to here
nfs-utils-2.8.4/support/junction/path.c:276:21: call_function: calling 'nsdb_normalize_path' from 'nsdb_path_array_to_posix'
#  114|   	len = strlen(pathname);
#  115|   	if (len == 0) {
#  116|-> 		xlog(D_CALL, "%s: NULL pathname", __func__);
#  117|   		return NULL;
#  118|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
nfs-utils-2.8.4/support/junction/path.c:134:9: warning[-Wanalyzer-malloc-leak]: leak of 'result'
nfs-utils-2.8.4/support/junction/path.c:293:1: enter_function: entry to 'nsdb_posix_to_path_array'
nfs-utils-2.8.4/support/junction/path.c:299:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/junction/path.c:307:22: branch_false: ...to here
nfs-utils-2.8.4/support/junction/path.c:307:22: call_function: calling 'nsdb_normalize_path' from 'nsdb_posix_to_path_array'
#  132|   		result[j - 1] = '\0';
#  133|   
#  134|-> 	xlog(D_CALL, "%s: result = '%s'", __func__, result);
#  135|   	return result;
#  136|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&path, 2)'
nfs-utils-2.8.4/support/nfs/cacheio.c:241:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/cacheio.c:243:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/cacheio.c:244:22: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/cacheio.c:245:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: throw: if 'write' throws an exception...
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: danger: 'open(&path, 2)' leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  244|   		fd = open(path, O_RDWR);
#  245|   		if (fd >= 0) {
#  246|-> 			if (write(fd, stime, strlen(stime)) != (ssize_t)strlen(stime)) {
#  247|   				xlog_warn("Writing to '%s' failed: errno %d (%s)",
#  248|   				path, errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&path, 2)'
nfs-utils-2.8.4/support/nfs/cacheio.c:241:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/cacheio.c:243:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/cacheio.c:244:22: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/cacheio.c:245:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/cacheio.c:246:29: danger: 'open(&path, 2)' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  244|   		fd = open(path, O_RDWR);
#  245|   		if (fd >= 0) {
#  246|-> 			if (write(fd, stime, strlen(stime)) != (ssize_t)strlen(stime)) {
#  247|   				xlog_warn("Writing to '%s' failed: errno %d (%s)",
#  248|   				path, errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-127): [#def66]
nfs-utils-2.8.4/support/nfs/conffile.c:984:54: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
nfs-utils-2.8.4/support/nfs/conffile.c:960:1: enter_function: entry to 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:967:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:969:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:972:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:974:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:975:12: branch_false: following 'false' branch (when 'liststr' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:977:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: following 'true' branch (when 'field' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:983:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:984:30: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:984:54: danger: out-of-bounds read at byte -1 but region starts at byte 0
#  982|   		/* Skip trailing whitespace */
#  983|   		if (p) {
#  984|-> 			for (t = p - 1; t > field && isspace (*t); t--)
#  985|   				*t = '\0';
#  986|   		}

Error: GCC_ANALYZER_WARNING (CWE-124): [#def67]
nfs-utils-2.8.4/support/nfs/conffile.c:985:33: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
nfs-utils-2.8.4/support/nfs/conffile.c:960:1: enter_function: entry to 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:967:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:969:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:972:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:974:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:975:12: branch_false: following 'false' branch (when 'liststr' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:977:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: following 'true' branch (when 'field' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:983:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:984:30: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:985:33: danger: out-of-bounds write at byte -1 but region starts at byte 0
#  983|   		if (p) {
#  984|   			for (t = p - 1; t > field && isspace (*t); t--)
#  985|-> 				*t = '\0';
#  986|   		}
#  987|   		if (*field == '\0') {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: warning[-Wanalyzer-malloc-leak]: leak of 'list'
nfs-utils-2.8.4/support/nfs/conffile.c:960:1: enter_function: entry to 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:966:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:967:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:969:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:972:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:974:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:975:12: branch_false: following 'false' branch (when 'liststr' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:977:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: following 'true' branch (when 'field' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:983:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:984:30: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:987:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: danger: 'list' leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  986|   		}
#  987|   		if (*field == '\0') {
#  988|-> 			xlog(LOG_INFO, "conf_get_list: empty field, ignoring...");
#  989|   			continue;
#  990|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: warning[-Wanalyzer-malloc-leak]: leak of 'p'
nfs-utils-2.8.4/support/nfs/conffile.c:960:1: enter_function: entry to 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:967:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:969:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:971:19: call_function: inlined call to 'conf_get_str' from 'conf_get_list'
nfs-utils-2.8.4/support/nfs/conffile.c:972:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:974:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:974:19: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:975:12: branch_false: following 'false' branch (when 'liststr' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:977:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: following 'true' branch (when 'field' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:978:16: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:983:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:984:30: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:987:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:988:25: danger: 'p' leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  986|   		}
#  987|   		if (*field == '\0') {
#  988|-> 			xlog(LOG_INFO, "conf_get_list: empty field, ignoring...");
#  989|   			continue;
#  990|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
nfs-utils-2.8.4/support/nfs/conffile.c:1450:9: warning[-Wanalyzer-malloc-leak]: leak of 'list'
nfs-utils-2.8.4/support/nfs/conffile.c:1437:12: branch_false: following 'false' branch (when 'count > 1')...
nfs-utils-2.8.4/support/nfs/conffile.c:1441:16: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1441:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:1442:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1442:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1445:30: branch_true: following 'true' branch (when 'node' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1446:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1450:9: throw: if 'qsort' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:1450:9: danger: 'list' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1448|   
# 1449|   	/* sort the array alphabetically by section and tag */
# 1450|-> 	qsort(list, count, sizeof(struct dumper *), dumper_compare);
# 1451|   
# 1452|   	/* rebuild the linked list in sorted order */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
nfs-utils-2.8.4/support/nfs/conffile.c:1531:17: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: return_function: returning to 'conf_write' from 'make_timestamp'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: inlined call to 'append_line' from 'conf_write'
# 1529|   	new = calloc(1, sizeof(struct outbuffer));
# 1530|   	if (new == NULL) {
# 1531|-> 		xlog(L_ERROR, "malloc error creating outbuffer");
# 1532|   		return NULL;
# 1533|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
nfs-utils-2.8.4/support/nfs/conffile.c:1531:17: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: return_function: returning to 'conf_write' from 'make_timestamp'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: inlined call to 'append_line' from 'conf_write'
# 1529|   	new = calloc(1, sizeof(struct outbuffer));
# 1530|   	if (new == NULL) {
# 1531|-> 		xlog(L_ERROR, "malloc error creating outbuffer");
# 1532|   		return NULL;
# 1533|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
nfs-utils-2.8.4/support/nfs/conffile.c:1573:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: calling 'make_section' from 'conf_write'
# 1571|   
# 1572|   	if (ret == -1) {
# 1573|-> 		xlog(L_ERROR, "malloc error composing section header");
# 1574|   		return NULL;
# 1575|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
nfs-utils-2.8.4/support/nfs/conffile.c:1573:17: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2173:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:28: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2285:36: branch_false: following 'false' branch (when 'tail' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2292:37: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2292:37: call_function: calling 'make_section' from 'conf_write'
# 1571|   
# 1572|   	if (ret == -1) {
# 1573|-> 		xlog(L_ERROR, "malloc error composing section header");
# 1574|   		return NULL;
# 1575|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
nfs-utils-2.8.4/support/nfs/conffile.c:1573:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: calling 'make_section' from 'conf_write'
# 1571|   
# 1572|   	if (ret == -1) {
# 1573|-> 		xlog(L_ERROR, "malloc error composing section header");
# 1574|   		return NULL;
# 1575|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
nfs-utils-2.8.4/support/nfs/conffile.c:1576:16: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: calling 'make_section' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: return_function: returning to 'conf_write' from 'make_section'
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: inlined call to 'append_line' from 'conf_write'
# 1574|   		return NULL;
# 1575|   	}
# 1576|-> 	return line;
# 1577|   }
# 1578|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
nfs-utils-2.8.4/support/nfs/conffile.c:1576:16: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: calling 'make_section' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: return_function: returning to 'conf_write' from 'make_section'
nfs-utils-2.8.4/support/nfs/conffile.c:2093:29: call_function: inlined call to 'append_line' from 'conf_write'
# 1574|   		return NULL;
# 1575|   	}
# 1576|-> 	return line;
# 1577|   }
# 1578|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
nfs-utils-2.8.4/support/nfs/conffile.c:1586:28: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2090:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2090:29: call_function: calling 'make_comment' from 'conf_write'
# 1584|   	int ret;
# 1585|   
# 1586|-> 	if (tag == NULL || *tag == '\0') {
# 1587|   		ret = asprintf(&line, "# %s\n", comment);
# 1588|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
nfs-utils-2.8.4/support/nfs/conffile.c:1586:28: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2089:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2089:20: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2090:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2090:29: call_function: calling 'make_comment' from 'conf_write'
# 1584|   	int ret;
# 1585|   
# 1586|-> 	if (tag == NULL || *tag == '\0') {
# 1587|   		ret = asprintf(&line, "# %s\n", comment);
# 1588|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
nfs-utils-2.8.4/support/nfs/conffile.c:1593:17: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1591|   
# 1592|   	if (ret == -1) {
# 1593|-> 		xlog(L_ERROR, "malloc error composing header");
# 1594|   		return NULL;
# 1595|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
nfs-utils-2.8.4/support/nfs/conffile.c:1593:17: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2113:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2129:26: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2132:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2151:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2160:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2160:29: call_function: calling 'make_comment' from 'conf_write'
# 1591|   
# 1592|   	if (ret == -1) {
# 1593|-> 		xlog(L_ERROR, "malloc error composing header");
# 1594|   		return NULL;
# 1595|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
nfs-utils-2.8.4/support/nfs/conffile.c:1593:17: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1591|   
# 1592|   	if (ret == -1) {
# 1593|-> 		xlog(L_ERROR, "malloc error composing header");
# 1594|   		return NULL;
# 1595|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
nfs-utils-2.8.4/support/nfs/conffile.c:1611:17: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1609|   	tstamp = localtime(&when);
# 1610|   	if (strftime(datestr, sizeof(datestr), "%b %d %Y %H:%M:%S", tstamp) == 0) {
# 1611|-> 		xlog(L_ERROR, "error composing date");
# 1612|   		datestr[0] = '\0';
# 1613|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
nfs-utils-2.8.4/support/nfs/conffile.c:1611:17: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2173:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1609|   	tstamp = localtime(&when);
# 1610|   	if (strftime(datestr, sizeof(datestr), "%b %d %Y %H:%M:%S", tstamp) == 0) {
# 1611|-> 		xlog(L_ERROR, "error composing date");
# 1612|   		datestr[0] = '\0';
# 1613|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
nfs-utils-2.8.4/support/nfs/conffile.c:1611:17: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1609|   	tstamp = localtime(&when);
# 1610|   	if (strftime(datestr, sizeof(datestr), "%b %d %Y %H:%M:%S", tstamp) == 0) {
# 1611|-> 		xlog(L_ERROR, "error composing date");
# 1612|   		datestr[0] = '\0';
# 1613|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
nfs-utils-2.8.4/support/nfs/conffile.c:1618:25: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1616|   		ret = asprintf(&tmpstr, "%s on %s", modified_by, datestr);
# 1617|   		if (ret == -1) {
# 1618|-> 			xlog(L_ERROR, "malloc error composing a time stamp");
# 1619|   			return NULL;
# 1620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
nfs-utils-2.8.4/support/nfs/conffile.c:1618:25: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2173:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1616|   		ret = asprintf(&tmpstr, "%s on %s", modified_by, datestr);
# 1617|   		if (ret == -1) {
# 1618|-> 			xlog(L_ERROR, "malloc error composing a time stamp");
# 1619|   			return NULL;
# 1620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
nfs-utils-2.8.4/support/nfs/conffile.c:1618:25: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
# 1616|   		ret = asprintf(&tmpstr, "%s on %s", modified_by, datestr);
# 1617|   		if (ret == -1) {
# 1618|-> 			xlog(L_ERROR, "malloc error composing a time stamp");
# 1619|   			return NULL;
# 1620|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
nfs-utils-2.8.4/support/nfs/conffile.c:1657:17: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nfs-utils-2.8.4/support/nfs/conffile.c:1639:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:1639:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1646:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:1647:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1653:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1656:12: branch_true: following 'true' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1657:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1657:17: throw: if 'xlog_warn' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:1657:17: danger: 'name' leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
# 1655|   	/* malformed line */
# 1656|   	if (end == NULL) {
# 1657|-> 		xlog_warn("conf_write: warning: malformed section name");
# 1658|   		goto cleanup;
# 1659|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
nfs-utils-2.8.4/support/nfs/conffile.c:1677:25: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nfs-utils-2.8.4/support/nfs/conffile.c:1639:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:1639:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1646:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:1647:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1653:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1656:12: branch_false: following 'false' branch (when 'end' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1656:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1666:12: branch_true: following 'true' branch (when 'sub' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1667:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1676:20: branch_true: following 'true' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1677:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1677:25: throw: if 'xlog_warn' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:1677:25: danger: 'name' leaks here; was allocated at [(3)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/2)
# 1675|   		end = strchr(sub, '"');
# 1676|   		if (end == NULL) {
# 1677|-> 			xlog_warn("conf_write: warning: malformed sub-section name");
# 1678|   			goto cleanup;
# 1679|   		}

Error: COMPILER_WARNING (CWE-704): [#def91]
nfs-utils-2.8.4/support/nfs/conffile.c: scope_hint: In function 'is_tag'
nfs-utils-2.8.4/support/nfs/conffile.c:1711:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1711 |         end = strchr(line, '=');
#      |             ^
# 1709|   
# 1710|   	/* quick check, is this even an assignment line */
# 1711|-> 	end = strchr(line, '=');
# 1712|   	if (end == NULL)
# 1713|   		return false;

Error: COMPILER_WARNING (CWE-704): [#def92]
nfs-utils-2.8.4/support/nfs/conffile.c:1711:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1709|   
# 1710|   	/* quick check, is this even an assignment line */
# 1711|-> 	end = strchr(line, '=');
# 1712|   	if (end == NULL)
# 1713|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
nfs-utils-2.8.4/support/nfs/conffile.c:1738:17: warning[-Wanalyzer-malloc-leak]: leak of 'name'
nfs-utils-2.8.4/support/nfs/conffile.c:1719:16: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:1720:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1726:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1727:12: branch_false: following 'false' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1729:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1730:12: branch_false: following 'false' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1734:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1737:12: branch_true: following 'true' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1738:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1738:17: throw: if 'xlog_warn' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:1738:17: danger: 'name' leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1736|   	/* malformed line, i swear the equals was there earlier */
# 1737|   	if (end == NULL) {
# 1738|-> 		xlog_warn("conf_write: warning: malformed tag name");
# 1739|   		goto cleanup;
# 1740|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def94]
nfs-utils-2.8.4/support/nfs/conffile.c:1750: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
# 1748|   	if (*name == '"') {
# 1749|   		char * new = strdup(name+1);
# 1750|-> 		end = strchr(new, '"');
# 1751|   		if (end != NULL) {
# 1752|   			*end = 0;

Error: COMPILER_WARNING (CWE-704): [#def95]
nfs-utils-2.8.4/support/nfs/conffile.c: scope_hint: In function 'is_taggedcomment'
nfs-utils-2.8.4/support/nfs/conffile.c:1825:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1825 |         end = strchr(line, ':');
#      |             ^
# 1823|   
# 1824|   	/* quick check, is this even a likely formatted line */
# 1825|-> 	end = strchr(line, ':');
# 1826|   	if (end == NULL)
# 1827|   		return false;

Error: COMPILER_WARNING (CWE-704): [#def96]
nfs-utils-2.8.4/support/nfs/conffile.c:1825:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1823|   
# 1824|   	/* quick check, is this even a likely formatted line */
# 1825|-> 	end = strchr(line, ':');
# 1826|   	if (end == NULL)
# 1827|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def97]
nfs-utils-2.8.4/support/nfs/conffile.c:1842:37: warning[-Wanalyzer-null-dereference]: dereference of NULL 'end'
nfs-utils-2.8.4/support/nfs/conffile.c:1819:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:1822:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1826:12: branch_false: following 'false' branch (when 'end' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1826:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1834:12: branch_false: following 'false' branch (when 'name' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1840:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1841:12: branch_false: following 'false' branch (when 'end' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:1841:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1842:16: branch_true: following 'true' branch (when 'name < end')...
nfs-utils-2.8.4/support/nfs/conffile.c:1842:37: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:1842:37: danger: dereference of NULL 'end'
# 1840|   	end = strchr(name, ':');
# 1841|   	if (end) *(end--) = 0;
# 1842|-> 	while (end && end > name && isblank(*end))
# 1843|   		*(end--)=0;
# 1844|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
nfs-utils-2.8.4/support/nfs/conffile.c:1940:33: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2113:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
# 1938|   			newbuff = realloc(*buff, *buffsize);
# 1939|   			if (newbuff == NULL) {
# 1940|-> 				xlog(L_ERROR, "malloc error reading line");
# 1941|   				return -1;
# 1942|   			}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
nfs-utils-2.8.4/support/nfs/conffile.c:1974:33: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: return_function: returning to 'conf_write' from 'make_timestamp'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: inlined call to 'append_line' from 'conf_write'
# 1972|   			ret = asprintf(&thisline, "%s\\\n", start);
# 1973|   			if (ret == -1) {
# 1974|-> 				xlog(L_ERROR, "malloc error composing output");
# 1975|   				return -1;
# 1976|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
nfs-utils-2.8.4/support/nfs/conffile.c:1974:33: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2308:22: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2308:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: calling 'make_timestamp' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: return_function: returning to 'conf_write' from 'make_timestamp'
nfs-utils-2.8.4/support/nfs/conffile.c:2318:21: call_function: inlined call to 'append_line' from 'conf_write'
# 1972|   			ret = asprintf(&thisline, "%s\\\n", start);
# 1973|   			if (ret == -1) {
# 1974|-> 				xlog(L_ERROR, "malloc error composing output");
# 1975|   				return -1;
# 1976|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
nfs-utils-2.8.4/support/nfs/conffile.c:1990:25: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(buff)'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2129:26: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2129:26: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2123:29: call_function: inlined call to 'is_taggedcomment' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2123:29: call_function: inlined call to 'is_taggedcomment' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2122:29: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2124:37: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2124:37: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2124:37: call_function: inlined call to 'append_line' from 'conf_write'
# 1988|   		}
# 1989|   
# 1990|-> 		qbuff = make_outbuffer(thisline);
# 1991|   		if (qbuff == NULL)
# 1992|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
nfs-utils-2.8.4/support/nfs/conffile.c:2036:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: call_function: calling 'lock_file' from 'conf_write'
# 2034|   	ret = flock(fileno(f), LOCK_EX);
# 2035|   	if (ret) 
# 2036|-> 		xlog(L_ERROR, "Error could not lock the file");
# 2037|   	return ret;
# 2038|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def103]
nfs-utils-2.8.4/support/nfs/conffile.c:2036:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: call_function: calling 'lock_file' from 'conf_write'
# 2034|   	ret = flock(fileno(f), LOCK_EX);
# 2035|   	if (ret) 
# 2036|-> 		xlog(L_ERROR, "Error could not lock the file");
# 2037|   	return ret;
# 2038|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
nfs-utils-2.8.4/support/nfs/conffile.c:2036:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: call_function: calling 'lock_file' from 'conf_write'
# 2034|   	ret = flock(fileno(f), LOCK_EX);
# 2035|   	if (ret) 
# 2036|-> 		xlog(L_ERROR, "Error could not lock the file");
# 2037|   	return ret;
# 2038|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
nfs-utils-2.8.4/support/nfs/conffile.c:2036:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "wx")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2073:20: branch_false: following 'false' branch (when 'value' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2079:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2080:26: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2081:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2086:21: call_function: calling 'lock_file' from 'conf_write'
# 2034|   	ret = flock(fileno(f), LOCK_EX);
# 2035|   	if (ret) 
# 2036|-> 		xlog(L_ERROR, "Error could not lock the file");
# 2037|   	return ret;
# 2038|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def106]
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: danger: 'fopen(filename, "r+")' leaks here; was opened at [(5)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/4)
# 2113|   		buff = calloc(1, buffsize);
# 2114|   		if (buff == NULL) {
# 2115|-> 			xlog(L_ERROR, "malloc error for read buffer");
# 2116|   			goto cleanup;
# 2117|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2115:25: danger: 'fopen(filename, "r+")' leaks here; was allocated at [(5)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/4)
# 2113|   		buff = calloc(1, buffsize);
# 2114|   		if (buff == NULL) {
# 2115|-> 			xlog(L_ERROR, "malloc error for read buffer");
# 2116|   			goto cleanup;
# 2117|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def108]
nfs-utils-2.8.4/support/nfs/conffile.c:2122:29: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
# 2120|   		/* read in the file */
# 2121|   		do {
# 2122|-> 			if (*buff != '\0' 
# 2123|   			&& !is_taggedcomment(buff, "Modified")) {
# 2124|   				if (append_line(&inqueue, NULL, strdup(buff)))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
nfs-utils-2.8.4/support/nfs/conffile.c:2122:29: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_true: following 'true' branch (when the strings are equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2109:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2109:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2112:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2114:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2118:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2122:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2128:31: call_function: calling 'read_line' from 'conf_write'
# 2120|   		/* read in the file */
# 2121|   		do {
# 2122|-> 			if (*buff != '\0' 
# 2123|   			&& !is_taggedcomment(buff, "Modified")) {
# 2124|   				if (append_line(&inqueue, NULL, strdup(buff)))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def110]
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: danger: 'fopen(filename, "r+")' leaks here; was opened at [(5)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/4)
# 2173|   		buff = calloc(1, buffsize);
# 2174|   		if (buff == NULL) {
# 2175|-> 			xlog(L_ERROR, "malloc error for read buffer");
# 2176|   			goto cleanup;
# 2177|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2175:25: danger: 'fopen(filename, "r+")' leaks here; was allocated at [(5)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/4)
# 2173|   		buff = calloc(1, buffsize);
# 2174|   		if (buff == NULL) {
# 2175|-> 			xlog(L_ERROR, "malloc error for read buffer");
# 2176|   			goto cleanup;
# 2177|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
nfs-utils-2.8.4/support/nfs/conffile.c:2185:37: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
# 2183|   			/* read in one section worth of lines */
# 2184|   			do {
# 2185|-> 				if (*buff != '\0' 
# 2186|   				&& !is_taggedcomment(buff, "Modified")) {
# 2187|   					if (append_line(&inqueue, NULL, strdup(buff)))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
nfs-utils-2.8.4/support/nfs/conffile.c:2185:37: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r+")'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
# 2183|   			/* read in one section worth of lines */
# 2184|   			do {
# 2185|-> 				if (*buff != '\0' 
# 2186|   				&& !is_taggedcomment(buff, "Modified")) {
# 2187|   					if (append_line(&inqueue, NULL, strdup(buff)))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: throw: if 'rewind' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: danger: 'infile' leaks here; was opened at [(6)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/5)
# 2321|   
# 2322|   	/* now rewind and overwrite the file with the updated data */
# 2323|-> 	rewind(infile);
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2173:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: throw: if 'rewind' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: danger: 'buff' leaks here; was allocated at [(12)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/11)
# 2321|   
# 2322|   	/* now rewind and overwrite the file with the updated data */
# 2323|-> 	rewind(infile);
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: throw: if 'rewind' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: danger: 'infile' leaks here; was allocated at [(6)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/5)
# 2321|   
# 2322|   	/* now rewind and overwrite the file with the updated data */
# 2323|-> 	rewind(infile);
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: warning[-Wanalyzer-file-leak]: leak of FILE 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2325:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: danger: 'infile' leaks here; was opened at [(6)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/5)
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {
# 2326|-> 		xlog(L_ERROR, "Error truncating config file");
# 2327|   		goto cleanup;
# 2328|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: warning[-Wanalyzer-malloc-leak]: leak of 'buff'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2173:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2325:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: danger: 'buff' leaks here; was allocated at [(12)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/11)
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {
# 2326|-> 		xlog(L_ERROR, "Error truncating config file");
# 2327|   		goto cleanup;
# 2328|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: warning[-Wanalyzer-malloc-leak]: leak of 'infile'
nfs-utils-2.8.4/support/nfs/conffile.c:2047:1: enter_function: entry to 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2061:12: branch_false: following 'false' branch (when 'filename' is non-NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2066:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2066:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2071:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/conffile.c:2072:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2102:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2102:12: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/conffile.c:2169:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2169:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2172:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2174:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2179:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2185:36: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: call_function: calling 'read_line' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2191:39: return_function: returning to 'conf_write' from 'read_line'
nfs-utils-2.8.4/support/nfs/conffile.c:2196:32: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2203:28: branch_false: following 'false' branch (when 'where' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2282:29: branch_false: following 'false' branch (when 'value' is NULL)...
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: call_function: calling 'append_queue' from 'conf_write'
nfs-utils-2.8.4/support/nfs/conffile.c:2301:25: return_function: returning to 'conf_write' from 'append_queue'
nfs-utils-2.8.4/support/nfs/conffile.c:2302:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2305:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2305:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2323:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2325:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/conffile.c:2326:17: danger: 'infile' leaks here; was allocated at [(6)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/5)
# 2324|   
# 2325|   	if (ftruncate(fileno(infile), 0)) {
# 2326|-> 		xlog(L_ERROR, "Error truncating config file");
# 2327|   		goto cleanup;
# 2328|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
nfs-utils-2.8.4/support/nfs/exports.c:475:17: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:797:34: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:797:34: call_function: calling 'parse_flavors' from 'parseopts'
#  473|   	}
#  474|   	if (p - ep->e_secinfo >= SECFLAVOR_COUNT) {
#  475|-> 		xlog(L_ERROR, "more than %d security flavors on an export\n",
#  476|   			SECFLAVOR_COUNT);
#  477|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
nfs-utils-2.8.4/support/nfs/exports.c:507:25: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:797:34: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:797:34: call_function: calling 'parse_flavors' from 'parseopts'
#  505|   		struct flav_info *flav = find_flavor(flavor);
#  506|   		if (flav == NULL) {
#  507|-> 			xlog(L_ERROR, "unknown flavor %s\n", flavor);
#  508|   			return 0;
#  509|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
nfs-utils-2.8.4/support/nfs/exports.c:549:17: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:800:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:800:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:801:30: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:801:30: call_function: calling 'parse_xprtsec' from 'parseopts'
#  547|   
#  548|   	if (p - ep->e_xprtsec >= XPRTSECMODE_COUNT) {
#  549|-> 		xlog(L_ERROR, "more than %d xprtsec modes on an export\n",
#  550|   			XPRTSECMODE_COUNT);
#  551|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def123]
nfs-utils-2.8.4/support/nfs/exports.c:663:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'opt' where non-null expected
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: this call could return NULL
nfs-utils-2.8.4/support/nfs/exports.c:663:21: danger: argument 1 ('opt') from [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  661|   
#  662|   		/* process keyword */
#  663|-> 		if (strcmp(opt, "ro") == 0)
#  664|   			setflags(NFSEXP_READONLY, active, ep);
#  665|   		else if (strcmp(opt, "rw") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
nfs-utils-2.8.4/support/nfs/exports.c:725:33: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:723:48: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:725:33: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:725:33: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  723|   			ep->e_anonuid = strtol(opt+8, &oe, 10);
#  724|   			if (opt[8]=='\0' || *oe != '\0') {
#  725|-> 				xlog(L_ERROR, "%s: %d: bad anonuid \"%s\"\n",
#  726|   				     flname, flline, opt);
#  727|   bad_option:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
nfs-utils-2.8.4/support/nfs/exports.c:735:33: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:733:48: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:735:33: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:735:33: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  733|   			ep->e_anongid = strtol(opt+8, &oe, 10);
#  734|   			if (opt[8]=='\0' || *oe != '\0') {
#  735|-> 				xlog(L_ERROR, "%s: %d: bad anongid \"%s\"\n",
#  736|   				     flname, flline, opt);
#  737|   				goto bad_option;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
nfs-utils-2.8.4/support/nfs/exports.c:766:41: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:750:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:750:28: branch_false: following 'false' branch (when 'saw_reexport == 0')...
nfs-utils-2.8.4/support/nfs/exports.c:756:36: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:756:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:760:46: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:763:41: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:766:41: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:766:41: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:766:41: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  764|   					ep->e_uuid = strdup(opt+5);
#  765|   				else {
#  766|-> 					xlog(L_ERROR, "%s: %d: bad fsid \"%s\"\n",
#  767|   					     flname, flline, opt);
#  768|   					goto bad_option;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
nfs-utils-2.8.4/support/nfs/exports.c:807:33: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:800:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:800:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:803:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:803:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:804:42: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:806:28: branch_true: following 'true' branch (when 'strategy' is NULL)...
nfs-utils-2.8.4/support/nfs/exports.c:807:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:807:33: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:807:33: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  805|   
#  806|   			if (!strategy) {
#  807|-> 				xlog(L_ERROR, "%s:%d: bad option %s\n",
#  808|   				     flname, flline, opt);
#  809|   				goto bad_option;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
nfs-utils-2.8.4/support/nfs/exports.c:826:33: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:800:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:800:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:803:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:803:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:804:42: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:806:28: branch_false: following 'false' branch (when 'strategy' is non-NULL)...
nfs-utils-2.8.4/support/nfs/exports.c:811:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:813:28: branch_false: following 'false' branch (when 'saw_reexport == 0')...
nfs-utils-2.8.4/support/nfs/exports.c:819:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:819:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:821:36: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:821:35: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:823:36: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:823:35: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:826:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:826:33: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:826:33: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  824|   				ep->e_reexport = REEXP_NONE;
#  825|   			} else {
#  826|-> 				xlog(L_ERROR, "%s:%d: bad option %s\n",
#  827|   				     flname, flline, strategy);
#  828|   				goto bad_option;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
nfs-utils-2.8.4/support/nfs/exports.c:831:29: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:800:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:800:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:803:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:803:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:804:42: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:806:28: branch_false: following 'false' branch (when 'strategy' is non-NULL)...
nfs-utils-2.8.4/support/nfs/exports.c:811:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:813:28: branch_false: following 'false' branch (when 'saw_reexport == 0')...
nfs-utils-2.8.4/support/nfs/exports.c:819:29: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:831:29: throw: if 'reexpdb_apply_reexport_settings' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:831:29: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  829|   			}
#  830|   
#  831|-> 			if (reexpdb_apply_reexport_settings(ep, flname, flline) != 0)
#  832|   				goto bad_option;
#  833|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
nfs-utils-2.8.4/support/nfs/exports.c:839:25: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:743:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:743:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:747:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:747:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:772:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:773:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:774:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:771:28: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:790:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:790:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:793:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:793:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:796:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:796:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:800:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:800:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:803:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:803:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:839:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:839:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/exports.c:839:25: danger: 'opt' leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  837|   			saw_reexport = 1;
#  838|   		} else {
#  839|-> 			xlog(L_ERROR, "%s:%d: unknown keyword \"%s\"\n",
#  840|   					flname, flline, opt);
#  841|   			setflags(NFSEXP_ALLSQUASH | NFSEXP_READONLY, active, ep);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
nfs-utils-2.8.4/support/nfs/exports.c:883:25: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:740:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:740:29: call_function: calling 'parsesquash' from 'parseopts'
#  881|   		if (id0 == -1 || id1 == -1) {
#  882|   			syntaxerr("uid/gid -1 not permitted");
#  883|-> 			xfree(id);
#  884|   			return -1;
#  885|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
nfs-utils-2.8.4/support/nfs/exports.c:887:38: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:740:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:740:29: call_function: calling 'parsesquash' from 'parseopts'
#  885|   		}
#  886|   		if ((len % 8) == 0)
#  887|-> 			id = (int *) xrealloc(id, (len + 8) * sizeof(*id));
#  888|   		id[len++] = id0;
#  889|   		id[len++] = id1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
nfs-utils-2.8.4/support/nfs/exports.c:894:25: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:740:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:740:29: call_function: calling 'parsesquash' from 'parseopts'
#  892|   		if (*cp != ',') {
#  893|   			syntaxerr("bad uid/gid list");
#  894|-> 			xfree(id);
#  895|   			return -1;
#  896|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
nfs-utils-2.8.4/support/nfs/exports.c:958:9: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
nfs-utils-2.8.4/support/nfs/exports.c:636:1: enter_function: entry to 'parseopts'
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:646:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:652:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:653:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:653:29: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/exports.c:665:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:667:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:667:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:669:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:669:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:671:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:671:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:673:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:673:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:675:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:675:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:677:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:677:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:679:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:679:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:681:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:681:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:683:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:683:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:685:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:685:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:687:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:687:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:689:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:689:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:691:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:691:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:693:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:693:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:695:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:695:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:697:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:697:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:699:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:699:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:702:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:702:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:705:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:705:27: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:707:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:707:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:709:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:709:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:711:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:711:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:713:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:713:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:715:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:715:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:717:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:717:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:719:27: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:719:25: branch_false: following 'false' branch (when the strings are non-equal)...
nfs-utils-2.8.4/support/nfs/exports.c:721:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:721:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:731:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:731:27: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:739:28: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:739:27: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/exports.c:740:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:740:29: call_function: calling 'parsesquash' from 'parseopts'
#  956|   syntaxerr(char *msg)
#  957|   {
#  958|-> 	xlog(L_ERROR, "%s:%d: syntax error: %s",
#  959|   			efname, efp?efp->x_line:0, msg);
#  960|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
nfs-utils-2.8.4/support/nfs/exports.c:980:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 0)'
nfs-utils-2.8.4/support/nfs/exports.c:976:14: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/exports.c:977:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/exports.c:979:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/exports.c:980:9: danger: 'open(path, 0)' leaks here; was opened at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  978|   		goto good;
#  979|   	c = read(fd, buf, 50);
#  980|-> 	close(fd);
#  981|   	if (c == -1)
#  982|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
nfs-utils-2.8.4/support/nfs/getport.c:339:17: warning[-Wanalyzer-malloc-leak]: leak of 'nc_netid'
nfs-utils-2.8.4/support/nfs/getport.c:324:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/getport.c:326:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/getport.c:329:16: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/getport.c:331:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/getport.c:338:28: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/getport.c:339:17: throw: if 'endnetconfig' throws an exception...
nfs-utils-2.8.4/support/nfs/getport.c:339:17: danger: 'nc_netid' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  337|   
#  338|   		nc_netid = strdup(nconf->nc_netid);
#  339|-> 		endnetconfig(handle);
#  340|   
#  341|   		if (nc_netid == NULL)

Error: COMPILER_WARNING (CWE-126): [#def137]
nfs-utils-2.8.4/support/nfs/getport.c:459:24: warning[-Wstringop-overread]: 'strndup' specified bound 108 exceeds source size 14
#  459 |                 return strndup(sun->sun_path, sizeof(sun->sun_path));
#      |                        ^
nfs-utils-2.8.4/support/nfs/getport.c: scope_hint: In function 'main'
nfs-utils-2.8.4/support/nfs/getport.c:1119:28: note: source object allocated here
# 1119 |         struct sockaddr_in addr = {
#      |                            ^
#  457|   	switch (sap->sa_family) {
#  458|   	case AF_LOCAL:
#  459|-> 		return strndup(sun->sun_path, sizeof(sun->sun_path));
#  460|   	case AF_INET:
#  461|   		if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr,

Error: COMPILER_WARNING (CWE-126): [#def138]
nfs-utils-2.8.4/support/nfs/getport.c:459:24: warning[-Wstringop-overread]: 'strndup' specified bound 108 exceeds source size 26
#  459 |                 return strndup(sun->sun_path, sizeof(sun->sun_path));
#      |                        ^
nfs-utils-2.8.4/support/nsm/rpc.c: scope_hint: In function 'nsm_xmit_getaddr.constprop'
nfs-utils-2.8.4/support/nsm/rpc.c:231:29: note: source object allocated here
#  231 |         struct sockaddr_in6 addr;
#      |                             ^
#  457|   	switch (sap->sa_family) {
#  458|   	case AF_LOCAL:
#  459|-> 		return strndup(sun->sun_path, sizeof(sun->sun_path));
#  460|   	case AF_INET:
#  461|   		if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
nfs-utils-2.8.4/support/nfs/mydaemon.c:126:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 2)'
nfs-utils-2.8.4/support/nfs/mydaemon.c:73:12: branch_false: following 'false' branch (when 'fg == 0')...
nfs-utils-2.8.4/support/nfs/mydaemon.c:76:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:76:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/mydaemon.c:82:15: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:83:12: branch_false: following 'false' branch (when 'pid >= 0')...
nfs-utils-2.8.4/support/nfs/mydaemon.c:89:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:89:12: branch_false: following 'false' branch (when 'pid == 0')...
nfs-utils-2.8.4/support/nfs/mydaemon.c:98:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:101:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/mydaemon.c:101:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:107:16: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/mydaemon.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:116:18: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/mydaemon.c:117:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/mydaemon.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/mydaemon.c:126:9: danger: 'open("/dev/null", 2)' leaks here; was opened at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  124|   	dup2(tempfd, 1);
#  125|   	dup2(tempfd, 2);
#  126|-> 	close(tempfd);
#  127|   	closelog();
#  128|   	dup2(pipefds[1], 3);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:98:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:86:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:87:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:93:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:98:18: throw: if 'clnt_vc_create' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:98:18: danger: 'sock' leaks here
#   96|   #ifdef HAVE_LIBTIRPC
#   97|   	memcpy(nbuf.buf, sap, (size_t)salen);
#   98|-> 	client = clnt_vc_create(sock, &nbuf, program, version, 0, 0);
#   99|   #else	/* !HAVE_LIBTIRPC */
#  100|   	client = clntunix_create((struct sockaddr_un *)sap,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:132:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:332:16: enter_function: entry to 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:358:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:359:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_tcpclient'
#  130|   	switch (family) {
#  131|   	case AF_INET:
#  132|-> 		return bindresvport_sa(sock, (struct sockaddr *)(char *)&sin);
#  133|   	case AF_INET6:
#  134|   		return bindresvport_sa(sock, (struct sockaddr *)(char *)&sin6);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:134:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:332:16: enter_function: entry to 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:358:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:359:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_tcpclient'
#  132|   		return bindresvport_sa(sock, (struct sockaddr *)(char *)&sin);
#  133|   	case AF_INET6:
#  134|-> 		return bindresvport_sa(sock, (struct sockaddr *)(char *)&sin6);
#  135|   	}
#  136|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:176:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:420:9: enter_function: entry to 'nfs_get_rpcclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:435:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:445:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:447:24: call_function: calling 'nfs_get_tcpclient' from 'nfs_get_rpcclient'
#  174|   	fd_set rset;
#  175|   
#  176|-> 	flags = fcntl(fd, F_GETFL, 0);
#  177|   	if (flags < 0)
#  178|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:249:16: enter_function: entry to 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:275:16: acquire_resource: datagram socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:276:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: return_function: returning to 'nfs_get_udpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:285:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: throw: if '__rpc_createerr' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: danger: 'sock' leaks here
#  284|   
#  285|   		if (ret < 0) {
#  286|-> 			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  287|   			rpc_createerr.cf_error.re_errno = errno;
#  288|   			(void)close(sock);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:287:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:249:16: enter_function: entry to 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:275:16: acquire_resource: datagram socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:276:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: return_function: returning to 'nfs_get_udpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:285:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:287:25: throw: if '__rpc_createerr' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:287:25: danger: 'sock' leaks here
#  285|   		if (ret < 0) {
#  286|   			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  287|-> 			rpc_createerr.cf_error.re_errno = errno;
#  288|   			(void)close(sock);
#  289|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:288:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:249:16: enter_function: entry to 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:275:16: acquire_resource: datagram socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:276:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:282:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_udpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:283:23: return_function: returning to 'nfs_get_udpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:285:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:286:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:288:31: throw: if 'close' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:288:31: danger: 'sock' leaks here
#  286|   			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  287|   			rpc_createerr.cf_error.re_errno = errno;
#  288|-> 			(void)close(sock);
#  289|   			return NULL;
#  290|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:332:16: enter_function: entry to 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:358:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:359:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: return_function: returning to 'nfs_get_tcpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:368:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: throw: if '__rpc_createerr' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: danger: 'sock' leaks here
#  367|   
#  368|   		if (ret < 0) {
#  369|-> 			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  370|   			rpc_createerr.cf_error.re_errno = errno;
#  371|   			(void)close(sock);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:370:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:332:16: enter_function: entry to 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:358:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:359:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: return_function: returning to 'nfs_get_tcpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:368:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:370:25: throw: if '__rpc_createerr' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:370:25: danger: 'sock' leaks here
#  368|   		if (ret < 0) {
#  369|   			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  370|-> 			rpc_createerr.cf_error.re_errno = errno;
#  371|   			(void)close(sock);
#  372|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def149]
nfs-utils-2.8.4/support/nfs/rpc_socket.c:371:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:332:16: enter_function: entry to 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:358:16: acquire_resource: stream socket created here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:359:12: branch_false: following 'false' branch (when 'sock != -1')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:365:12: branch_true: following 'true' branch (when 'resvport != 0')...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: call_function: calling 'nfs_bindresvport' from 'nfs_get_tcpclient'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:366:23: return_function: returning to 'nfs_get_tcpclient' from 'nfs_bindresvport'
nfs-utils-2.8.4/support/nfs/rpc_socket.c:368:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:369:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpc_socket.c:371:31: throw: if 'close' throws an exception...
nfs-utils-2.8.4/support/nfs/rpc_socket.c:371:31: danger: 'sock' leaks here
#  369|   			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
#  370|   			rpc_createerr.cf_error.re_errno = errno;
#  371|-> 			(void)close(sock);
#  372|   			return NULL;
#  373|   		}

Error: GCC_ANALYZER_WARNING (CWE-479): [#def150]
nfs-utils-2.8.4/support/nfs/rpcmisc.c:56:25: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
nfs-utils-2.8.4/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.4/support/nfs/rpcmisc.c:51:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpcmisc.c:55:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpcmisc.c:55:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpcmisc.c:56:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpcmisc.c:56:25: danger: call to 'exit' from within signal handler
#   54|   
#   55|   		if (NFSCTL_TCPISSET(_rpcprotobits) == 0)
#   56|-> 			exit(0);
#   57|   
#   58|   		if (size == 0)

Error: GCC_ANALYZER_WARNING (CWE-479): [#def151]
nfs-utils-2.8.4/support/nfs/rpcmisc.c:65:25: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
nfs-utils-2.8.4/support/nfs/rpcmisc.c:47:1: enter_function: entry to 'closedown'
nfs-utils-2.8.4/support/nfs/rpcmisc.c:51:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/rpcmisc.c:55:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpcmisc.c:55:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/rpcmisc.c:58:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/rpcmisc.c:64:20: branch_true: following 'true' branch (when 'openfd != 2')...
nfs-utils-2.8.4/support/nfs/rpcmisc.c:65:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/rpcmisc.c:65:25: danger: call to 'exit' from within signal handler
#   63|   				openfd++;
#   64|   		if (openfd <= 1)
#   65|-> 			exit(0);
#   66|   	}
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
nfs-utils-2.8.4/support/nfs/svc_create.c:238:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
nfs-utils-2.8.4/support/nfs/svc_create.c:202:14: acquire_resource: socket created here
nfs-utils-2.8.4/support/nfs/svc_create.c:203:12: branch_false: following 'false' branch (when 'fd != -1')...
nfs-utils-2.8.4/support/nfs/svc_create.c:210:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:221:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:229:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:236:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:236:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:237:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:237:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:239:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:238:25: throw: if 'xlog' throws an exception...
nfs-utils-2.8.4/support/nfs/svc_create.c:238:25: danger: 'fd' leaks here
#  236|   	if (nconf->nc_semantics == NC_TPI_COTS_ORD)
#  237|   		if (listen(fd, SOMAXCONN) == -1) {
#  238|-> 			xlog(L_ERROR, "Could not listen on socket: (%d) %m",
#  239|   				errno);
#  240|   			(void)close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def153]
nfs-utils-2.8.4/support/nfs/svc_create.c:240:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
nfs-utils-2.8.4/support/nfs/svc_create.c:202:14: acquire_resource: socket created here
nfs-utils-2.8.4/support/nfs/svc_create.c:203:12: branch_false: following 'false' branch (when 'fd != -1')...
nfs-utils-2.8.4/support/nfs/svc_create.c:210:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:221:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:229:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:236:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:236:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:237:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:237:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfs/svc_create.c:239:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfs/svc_create.c:240:31: throw: if 'close' throws an exception...
nfs-utils-2.8.4/support/nfs/svc_create.c:240:31: danger: 'fd' leaks here
#  238|   			xlog(L_ERROR, "Could not listen on socket: (%d) %m",
#  239|   				errno);
#  240|-> 			(void)close(fd);
#  241|   			return -1;
#  242|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
nfs-utils-2.8.4/support/nfs/svc_socket.c:61:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/svc_socket.c:116:1: enter_function: entry to 'svc_socket'
nfs-utils-2.8.4/support/nfs/svc_socket.c:123:15: acquire_resource: socket created here
nfs-utils-2.8.4/support/nfs/svc_socket.c:123:6: branch_false: following 'false' branch (when 'sock >= 0')...
nfs-utils-2.8.4/support/nfs/svc_socket.c:129:6: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_socket.c:129:6: branch_false: following 'false' branch (when 'reuse == 0')...
nfs-utils-2.8.4/support/nfs/svc_socket.c:142:3: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/svc_socket.c:144:19: call_function: calling 'getservport' from 'svc_socket'
#   59|   	if (ret == 0 && rpcp != NULL) {
#   60|   		/* First try name.  */
#   61|-> 		ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
#   62|   					sizeof servdata, &servp);
#   63|   		if ((ret != 0 || servp == NULL) && rpcp->r_aliases) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
nfs-utils-2.8.4/support/nfs/svc_socket.c:68:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sock'
nfs-utils-2.8.4/support/nfs/svc_socket.c:169:1: enter_function: entry to 'svcudp_socket'
nfs-utils-2.8.4/support/nfs/svc_socket.c:171:10: call_function: calling 'svc_socket' from 'svcudp_socket'
#   66|   			/* Then we try aliases.  */
#   67|   			for (a = (const char **) rpcp->r_aliases; *a != NULL; a++) {
#   68|-> 				ret = getservbyname_r(*a, proto, &servbuf, servdata,
#   69|   							sizeof servdata, &servp);
#   70|   				if (ret == 0 && servp != NULL)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def156]
nfs-utils-2.8.4/support/nfs/xcommon.c:33:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.4/support/nfs/xcommon.c:26:1: enter_function: entry to 'xstrndup'
nfs-utils-2.8.4/support/nfs/xcommon.c:29:9: branch_false: following 'false' branch (when 's' is non-NULL)...
nfs-utils-2.8.4/support/nfs/xcommon.c:32:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/xcommon.c:32:10: call_function: calling 'xmalloc' from 'xstrndup'
nfs-utils-2.8.4/support/nfs/xcommon.c:32:10: return_function: returning to 'xstrndup' from 'xmalloc'
nfs-utils-2.8.4/support/nfs/xcommon.c:33:6: danger: argument 1 ('xmalloc((long unsigned int)(n + 1))') NULL where non-null expected
#   31|   
#   32|        t = xmalloc(n+1);
#   33|->      strncpy(t,s,n);
#   34|        t[n] = 0;
#   35|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def157]
nfs-utils-2.8.4/support/nfs/xcommon.c:46:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.4/support/nfs/xcommon.c:40:1: enter_function: entry to 'xstrconcat2'
nfs-utils-2.8.4/support/nfs/xcommon.c:45:12: call_function: calling 'xmalloc' from 'xstrconcat2'
nfs-utils-2.8.4/support/nfs/xcommon.c:45:12: return_function: returning to 'xstrconcat2' from 'xmalloc'
nfs-utils-2.8.4/support/nfs/xcommon.c:46:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + 1)') NULL where non-null expected
#   44|        if (!t) t = "";
#   45|        res = xmalloc(strlen(s) + strlen(t) + 1);
#   46|->      strcpy(res, s);
#   47|        strcat(res, t);
#   48|        return res;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def158]
nfs-utils-2.8.4/support/nfs/xcommon.c:62:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.4/support/nfs/xcommon.c:53:1: enter_function: entry to 'xstrconcat3'
nfs-utils-2.8.4/support/nfs/xcommon.c:61:12: call_function: calling 'xmalloc' from 'xstrconcat3'
nfs-utils-2.8.4/support/nfs/xcommon.c:61:12: return_function: returning to 'xstrconcat3' from 'xmalloc'
nfs-utils-2.8.4/support/nfs/xcommon.c:62:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + strlen(u) + 1)') NULL where non-null expected
#   60|        if (!u) u = "";
#   61|        res = xmalloc(strlen(s) + strlen(t) + strlen(u) + 1);
#   62|->      strcpy(res, s);
#   63|        strcat(res, t);
#   64|        strcat(res, u);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def159]
nfs-utils-2.8.4/support/nfs/xcommon.c:82:6: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nfs-utils-2.8.4/support/nfs/xcommon.c:72:1: enter_function: entry to 'xstrconcat4'
nfs-utils-2.8.4/support/nfs/xcommon.c:81:12: call_function: calling 'xmalloc' from 'xstrconcat4'
nfs-utils-2.8.4/support/nfs/xcommon.c:81:12: return_function: returning to 'xstrconcat4' from 'xmalloc'
nfs-utils-2.8.4/support/nfs/xcommon.c:82:6: danger: argument 1 ('xmalloc(strlen(s) + strlen(t) + strlen(u) + strlen(v) + 1)') NULL where non-null expected
#   80|        if (!v) v = "";
#   81|        res = xmalloc(strlen(s) + strlen(t) + strlen(u) + strlen(v) + 1);
#   82|->      strcpy(res, s);
#   83|        strcat(res, t);
#   84|        strcat(res, u);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
nfs-utils-2.8.4/support/nfs/xio.c:33:25: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(fname,  type)'
nfs-utils-2.8.4/support/nfs/xio.c:31:20: acquire_resource: opened here
nfs-utils-2.8.4/support/nfs/xio.c:31:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/xio.c:33:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/xio.c:33:25: throw: if 'xmalloc' throws an exception...
nfs-utils-2.8.4/support/nfs/xio.c:33:25: danger: 'fopen(fname,  type)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   31|   	if (!(fp = fopen(fname, type)))
#   32|   		return NULL;
#   33|-> 	xfp = (XFILE *) xmalloc(sizeof(*xfp));
#   34|   	xfp->x_fp = fp;
#   35|   	xfp->x_line = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
nfs-utils-2.8.4/support/nfs/xio.c:33:25: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(fname,  type)'
nfs-utils-2.8.4/support/nfs/xio.c:31:20: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfs/xio.c:31:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfs/xio.c:33:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfs/xio.c:33:25: throw: if 'xmalloc' throws an exception...
nfs-utils-2.8.4/support/nfs/xio.c:33:25: danger: 'fopen(fname,  type)' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   31|   	if (!(fp = fopen(fname, type)))
#   32|   		return NULL;
#   33|-> 	xfp = (XFILE *) xmalloc(sizeof(*xfp));
#   34|   	xfp->x_fp = fp;
#   35|   	xfp->x_line = 1;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def162]
nfs-utils-2.8.4/support/nfs/xlog.c:189:25: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nfs-utils-2.8.4/support/nfs/xlog.c:236:1: enter_function: entry to 'xlog_err'
nfs-utils-2.8.4/support/nfs/xlog.c:240:9: acquire_resource: 'va_start' called here
nfs-utils-2.8.4/support/nfs/xlog.c:241:9: call_function: calling 'xlog_backend' from 'xlog_err'
#  187|   		switch (kind) {
#  188|   		case L_FATAL:
#  189|-> 			vsyslog(LOG_ERR, fmt, args);
#  190|   			break;
#  191|   		case L_ERROR:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def163]
nfs-utils-2.8.4/support/nfs/xlog.c:192:25: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nfs-utils-2.8.4/support/nfs/xlog.c:212:1: enter_function: entry to 'xlog'
nfs-utils-2.8.4/support/nfs/xlog.c:219:9: acquire_resource: 'va_start' called here
nfs-utils-2.8.4/support/nfs/xlog.c:220:9: call_function: calling 'xlog_backend' from 'xlog'
#  190|   			break;
#  191|   		case L_ERROR:
#  192|-> 			vsyslog(LOG_ERR, fmt, args);
#  193|   			break;
#  194|   		case L_WARNING:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def164]
nfs-utils-2.8.4/support/nfs/xlog.c:195:25: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nfs-utils-2.8.4/support/nfs/xlog.c:225:1: enter_function: entry to 'xlog_warn'
nfs-utils-2.8.4/support/nfs/xlog.c:229:9: acquire_resource: 'va_start' called here
nfs-utils-2.8.4/support/nfs/xlog.c:230:9: call_function: calling 'xlog_backend' from 'xlog_warn'
#  193|   			break;
#  194|   		case L_WARNING:
#  195|-> 			vsyslog(LOG_WARNING, fmt, args);
#  196|   			break;
#  197|   		case L_NOTICE:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def165]
nfs-utils-2.8.4/support/nfs/xlog.c:198:25: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nfs-utils-2.8.4/support/nfs/xlog.c:212:1: enter_function: entry to 'xlog'
nfs-utils-2.8.4/support/nfs/xlog.c:219:9: acquire_resource: 'va_start' called here
nfs-utils-2.8.4/support/nfs/xlog.c:220:9: call_function: calling 'xlog_backend' from 'xlog'
#  196|   			break;
#  197|   		case L_NOTICE:
#  198|-> 			vsyslog(LOG_NOTICE, fmt, args);
#  199|   			break;
#  200|   		default:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def166]
nfs-utils-2.8.4/support/nfs/xlog.c:202:33: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
nfs-utils-2.8.4/support/nfs/xlog.c:212:1: enter_function: entry to 'xlog'
nfs-utils-2.8.4/support/nfs/xlog.c:219:9: acquire_resource: 'va_start' called here
nfs-utils-2.8.4/support/nfs/xlog.c:220:9: call_function: calling 'xlog_backend' from 'xlog'
#  200|   		default:
#  201|   			if (!log_stderr)
#  202|-> 				vsyslog(LOG_INFO, fmt, args);
#  203|   			break;
#  204|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:146:17: warning[-Wanalyzer-malloc-leak]: leak of 'answ'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:348:14: enter_function: entry to 'get_default_domain'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:354:15: call_function: calling 'domain_from_dns' from 'get_default_domain'
#  144|   
#  145|   	if (res_init() < 0) {
#  146|-> 		IDMAP_LOG(2, ("libnfsidmap: res_init() failed for %s.%s: %s\n",
#  147|   			txtname, domain, hstrerror(h_errno)));
#  148|   		goto freemem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:146:17: warning[-Wanalyzer-malloc-leak]: leak of 'msg'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:348:14: enter_function: entry to 'get_default_domain'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:354:15: call_function: calling 'domain_from_dns' from 'get_default_domain'
#  144|   
#  145|   	if (res_init() < 0) {
#  146|-> 		IDMAP_LOG(2, ("libnfsidmap: res_init() failed for %s.%s: %s\n",
#  147|   			txtname, domain, hstrerror(h_errno)));
#  148|   		goto freemem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:152:17: warning[-Wanalyzer-malloc-leak]: leak of 'answ'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:348:14: enter_function: entry to 'get_default_domain'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:354:15: call_function: calling 'domain_from_dns' from 'get_default_domain'
#  150|   	len = res_querydomain(txtname, domain, C_IN, T_TXT, msg, NS_MAXMSG);
#  151|   	if (len < 0) {
#  152|-> 		IDMAP_LOG(2, ("libnfsidmap: res_querydomain() failed for %s.%s: %s\n",
#  153|   			txtname, domain, hstrerror(h_errno)));
#  154|   		goto freemem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of 'answ'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:348:14: enter_function: entry to 'get_default_domain'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:354:15: call_function: calling 'domain_from_dns' from 'get_default_domain'
#  158|   	/* See if there is an answer */
#  159|   	if (ntohs(hdr->ancount) < 1) {
#  160|-> 		IDMAP_LOG(2, ("libnfsidmap: No TXT record for %s.%s\n",
#  161|   			txtname, domain));
#  162|   		goto freemem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:268:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  266|   		dl = dlopen(plgname, RTLD_NOW | RTLD_LOCAL);
#  267|   		if (dl == NULL) {
#  268|-> 			IDMAP_LOG(1, ("libnfsidmap: Unable to load plugin: %s: %s",
#  269|   				  plgname, dlerror()));
#  270|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:268:25: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  266|   		dl = dlopen(plgname, RTLD_NOW | RTLD_LOCAL);
#  267|   		if (dl == NULL) {
#  268|-> 			IDMAP_LOG(1, ("libnfsidmap: Unable to load plugin: %s: %s",
#  269|   				  plgname, dlerror()));
#  270|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:274:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  272|   		init_func = (libnfsidmap_plugin_init_t) dlsym(dl, PLUGIN_INIT_FUNC);
#  273|   		if (init_func == NULL) {
#  274|-> 			IDMAP_LOG(1, ("libnfsidmap: Unable to get init function: %s: %s",
#  275|   				  plgname, dlerror()));
#  276|   			dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:274:25: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  272|   		init_func = (libnfsidmap_plugin_init_t) dlsym(dl, PLUGIN_INIT_FUNC);
#  273|   		if (init_func == NULL) {
#  274|-> 			IDMAP_LOG(1, ("libnfsidmap: Unable to get init function: %s: %s",
#  275|   				  plgname, dlerror()));
#  276|   			dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:280:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  278|   		}
#  279|   	}
#  280|-> 	trans = init_func();
#  281|   	if (trans == NULL) {
#  282|   		IDMAP_LOG(1, ("libnfsidmap: Failed to initialize plugin %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:280:17: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  278|   		}
#  279|   	}
#  280|-> 	trans = init_func();
#  281|   	if (trans == NULL) {
#  282|   		IDMAP_LOG(1, ("libnfsidmap: Failed to initialize plugin %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:282:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  280|   	trans = init_func();
#  281|   	if (trans == NULL) {
#  282|-> 		IDMAP_LOG(1, ("libnfsidmap: Failed to initialize plugin %s",
#  283|   			  PLUGIN_INIT_FUNC, plgname));
#  284|   		dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:282:17: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  280|   	trans = init_func();
#  281|   	if (trans == NULL) {
#  282|-> 		IDMAP_LOG(1, ("libnfsidmap: Failed to initialize plugin %s",
#  283|   			  PLUGIN_INIT_FUNC, plgname));
#  284|   		dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:288:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  286|   	}
#  287|   	if (trans->init) {
#  288|-> 		ret = trans->init();
#  289|   		if (ret) {
#  290|   			IDMAP_LOG(1, ("libnfsidmap: Failed in %s's init(), "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:288:23: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  286|   	}
#  287|   	if (trans->init) {
#  288|-> 		ret = trans->init();
#  289|   		if (ret) {
#  290|   			IDMAP_LOG(1, ("libnfsidmap: Failed in %s's init(), "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:290:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  288|   		ret = trans->init();
#  289|   		if (ret) {
#  290|-> 			IDMAP_LOG(1, ("libnfsidmap: Failed in %s's init(), "
#  291|   					"returned %d", plgname, ret));
#  292|   			dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:290:25: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  288|   		ret = trans->init();
#  289|   		if (ret) {
#  290|-> 			IDMAP_LOG(1, ("libnfsidmap: Failed in %s's init(), "
#  291|   					"returned %d", plgname, ret));
#  292|   			dlclose(dl);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:298:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  296|   	plgn->dl_handle = dl;
#  297|   	plgn->trans = trans;
#  298|-> 	IDMAP_LOG(1, ("libnfsidmap: loaded plugin %s for method %s",
#  299|   		  plgname, method));
#  300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:298:9: warning[-Wanalyzer-malloc-leak]: leak of 'plgns'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:376:5: enter_function: entry to 'nfs4_init_name_mapping'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:432:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:433:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:434:21: call_function: calling 'load_plugins' from 'nfs4_init_name_mapping'
#  296|   	plgn->dl_handle = dl;
#  297|   	plgn->trans = trans;
#  298|-> 	IDMAP_LOG(1, ("libnfsidmap: loaded plugin %s for method %s",
#  299|   		  plgname, method));
#  300|   

Error: CPPCHECK_WARNING (CWE-457): [#def185]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:416: error[uninitvar]: Uninitialized variable: r->field
#  414|   		if (local_realms) {
#  415|   			TAILQ_FOREACH(r, &local_realms->fields, link) {
#  416|-> 				siz += (strlen(r->field)+4);
#  417|   			}
#  418|   			buf = malloc(siz);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:407:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:409:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:415:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:418:31: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:419:28: branch_true: following 'true' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:420:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:421:33: branch_false: following 'false' branch (when 'r' is NULL)...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/libnfsidmap.c:424:33: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  422|   					sprintf(buf+strlen(buf), "'%s' ", r->field);
#  423|   				}
#  424|-> 				IDMAP_LOG(1, ("libnfsidmap: Realms list: %s", buf));
#  425|   				free(buf);
#  426|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:52:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:54:24: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:55:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:58:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:59:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:61:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:65:20: branch_false: following 'false' branch (when 'node' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:68:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:68:31: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:69:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: throw: if 'nfs4_get_default_domain' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: danger: '<unknown>' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   72|   		}
#   73|   
#   74|-> 		nfs4_get_default_domain(NULL, node->field, NFS4_MAX_DOMAIN_LEN);
#   75|   		toupper_str(node->field);
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of 'node'
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:52:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:54:24: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:55:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:58:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:59:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:61:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:64:24: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:65:20: branch_false: following 'false' branch (when 'node' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:68:31: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:69:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: throw: if 'nfs4_get_default_domain' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nfsidmap_common.c:74:17: danger: 'node' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   72|   		}
#   73|   
#   74|-> 		nfs4_get_default_domain(NULL, node->field, NFS4_MAX_DOMAIN_LEN);
#   75|   		toupper_str(node->field);
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
nfs-utils-2.8.4/support/nfsidmap/nss.c:59:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:89:12: enter_function: entry to 'nss_uid_to_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:97:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:98:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:100:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:100:12: branch_true: following 'true' branch (when 'domain' is NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:101:26: call_function: inlined call to 'get_default_domain' from 'nss_uid_to_name'
#   57|   	static char default_domain[NFS4_MAX_DOMAIN_LEN] = "";
#   58|   	if (default_domain[0] == 0) {
#   59|-> 		nfs4_get_default_domain(NULL, default_domain, NFS4_MAX_DOMAIN_LEN);
#   60|   	}
#   61|   	return default_domain;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
nfs-utils-2.8.4/support/nfsidmap/nss.c:102:16: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:97:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:98:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:100:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:102:16: throw: if 'getpwuid_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:102:16: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  100|   	if (domain == NULL)
#  101|   		domain = get_default_domain();
#  102|-> 	err = -getpwuid_r(uid, &pwbuf, buf, buflen, &pw);
#  103|   	if (pw == NULL)
#  104|   		err = -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
nfs-utils-2.8.4/support/nfsidmap/nss.c:133:24: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:130:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:131:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:133:24: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:133:24: throw: if 'getgrgid_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:133:24: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  131|   		if (!buf)
#  132|   			goto out;
#  133|-> 		err = -getgrgid_r(gid, &grbuf, buf, buflen, &gr);
#  134|   		if (gr == NULL && !err)
#  135|   			err = -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
nfs-utils-2.8.4/support/nfsidmap/nss.c:166:13: warning[-Wanalyzer-malloc-leak]: leak of 'strip_domain(name,  domain)'
nfs-utils-2.8.4/support/nfsidmap/nss.c:190:23: enter_function: entry to 'nss_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/nss.c:199:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:203:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: call_function: calling 'strip_domain' from 'nss_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: return_function: returning to 'nss_getpwnam' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:166:13: danger: 'strip_domain(name,  domain)' leaks here; was allocated at [(16)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/15)
#  164|   
#  165|   	c = strrchr(name, '@');
#  166|-> 	if (c == NULL && domain != NULL)
#  167|   		goto out;
#  168|   	if (c == NULL && domain == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
nfs-utils-2.8.4/support/nfsidmap/nss.c:166:13: warning[-Wanalyzer-malloc-leak]: leak of 'strip_domain(name, & default_domain)'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: call_function: calling 'strip_domain' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: return_function: returning to '_nss_name_to_gid' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:166:13: danger: 'strip_domain(name, & default_domain)' leaks here; was allocated at [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
#  164|   
#  165|   	c = strrchr(name, '@');
#  166|-> 	if (c == NULL && domain != NULL)
#  167|   		goto out;
#  168|   	if (c == NULL && domain == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:199:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:203:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  207|   	if (dostrip) {
#  208|   		localname = strip_domain(name, domain);
#  209|-> 		IDMAP_LOG(4, ("nss_getpwnam: name '%s' domain '%s': "
#  210|   			  "resulting localname '%s'", name, domain, localname));
#  211|   		if (localname == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:199:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:203:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:211:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:212:25: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  210|   			  "resulting localname '%s'", name, domain, localname));
#  211|   		if (localname == NULL) {
#  212|-> 			IDMAP_LOG(0, ("nss_getpwnam: name '%s' does not map "
#  213|   				"into domain '%s'", name,
#  214|   				domain ? domain : "<not-provided>"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
nfs-utils-2.8.4/support/nfsidmap/nss.c:218:23: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:190:23: enter_function: entry to 'nss_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/nss.c:199:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:203:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: call_function: calling 'strip_domain' from 'nss_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/nss.c:208:29: return_function: returning to 'nss_getpwnam' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:209:17: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:211:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:211:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:218:58: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:218:23: throw: if 'getpwnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:218:23: danger: 'buf' leaks here; was allocated at [(4)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/3)
#  216|   		}
#  217|   
#  218|-> 		err = getpwnam_r(localname, &buf->pwbuf, buf->buf, buflen, &pw);
#  219|   		if (pw == NULL && domain != NULL)
#  220|   			IDMAP_LOG(1,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
nfs-utils-2.8.4/support/nfsidmap/nss.c:225:23: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:199:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:202:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:203:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:207:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:225:53: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:225:23: throw: if 'getpwnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:225:23: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  223|   		free(localname);
#  224|   	} else {
#  225|-> 		err = getpwnam_r(name, &buf->pwbuf, buf->buf, buflen, &pw);
#  226|   		if (pw == NULL)
#  227|   			IDMAP_LOG(1,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: call_function: calling 'strip_domain' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: return_function: returning to '_nss_name_to_gid' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:334:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: danger: 'buf' leaks here; was allocated at [(25)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/24)
#  336|   			goto out_name;
#  337|   		if (dostrip)
#  338|-> 			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|   		else if (get_reformat_group())
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: call_function: calling 'strip_domain' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: return_function: returning to '_nss_name_to_gid' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: danger: 'localname' leaks here; was allocated at [(16)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/15)
#  336|   			goto out_name;
#  337|   		if (dostrip)
#  338|-> 			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|   		else if (get_reformat_group())
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:334:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: throw: if 'get_reformat_group' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: danger: 'buf' leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  337|   		if (dostrip)
#  338|   			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|-> 		else if (get_reformat_group())
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: throw: if 'get_reformat_group' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/13)
#  337|   		if (dostrip)
#  338|   			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|-> 		else if (get_reformat_group())
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:334:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: danger: 'buf' leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  338|   			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|   		else if (get_reformat_group())
#  340|-> 			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else
#  342|   			err = -getgrnam_r(name, &grbuf, buf, buflen, &gr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/13)
#  338|   			err = -getgrnam_r(localname, &grbuf, buf, buflen, &gr);
#  339|   		else if (get_reformat_group())
#  340|-> 			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else
#  342|   			err = -getgrnam_r(name, &grbuf, buf, buflen, &gr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:334:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: danger: 'buf' leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else
#  342|-> 			err = -getgrnam_r(name, &grbuf, buf, buflen, &gr);
#  343|   		if (gr == NULL && !err) {
#  344|   			if (dostrip)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:25: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:342:32: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/13)
#  340|   			err = -getgrnam_r(ref_name, &grbuf, buf, buflen, &gr);
#  341|   		else
#  342|-> 			err = -getgrnam_r(name, &grbuf, buf, buflen, &gr);
#  343|   		if (gr == NULL && !err) {
#  344|   			if (dostrip)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: call_function: calling 'strip_domain' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: return_function: returning to '_nss_name_to_gid' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:343:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:344:28: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:345:33: danger: 'localname' leaks here; was allocated at [(16)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/15)
#  343|   		if (gr == NULL && !err) {
#  344|   			if (dostrip)
#  345|-> 				IDMAP_LOG(1, ("nss_name_to_gid: name '%s' not found "
#  346|   					  "in domain '%s'", localname, domain));
#  347|   			else if (get_reformat_group())

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:340:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:343:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:344:28: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: throw: if 'get_reformat_group' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/13)
#  345|   				IDMAP_LOG(1, ("nss_name_to_gid: name '%s' not found "
#  346|   					  "in domain '%s'", localname, domain));
#  347|-> 			else if (get_reformat_group())
#  348|   				IDMAP_LOG(1, ("nss_name_to_gid: name '%s' not found "
#  349|   					  "(reformatted)", ref_name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:343:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:344:28: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:33: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:348:33: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/13)
#  346|   					  "in domain '%s'", localname, domain));
#  347|   			else if (get_reformat_group())
#  348|-> 				IDMAP_LOG(1, ("nss_name_to_gid: name '%s' not found "
#  349|   					  "(reformatted)", ref_name));
#  350|   			else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: warning[-Wanalyzer-malloc-leak]: leak of 'ref_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:319:19: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: call_function: calling 'reformat_name' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:320:28: return_function: returning to '_nss_name_to_gid' from 'reformat_name'
nfs-utils-2.8.4/support/nfsidmap/nss.c:321:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:339:26: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:343:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:344:28: branch_false: following 'false' branch (when 'dostrip == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:347:33: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:351:33: danger: 'ref_name' leaks here; was allocated at [(14)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/13)
#  349|   					  "(reformatted)", ref_name));
#  350|   			else
#  351|-> 				IDMAP_LOG(1, ("nss_name_to_gid: name '%s' not found "
#  352|   					  "(domain not stripped)", name));
#  353|   			err = -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
nfs-utils-2.8.4/support/nfsidmap/nss.c:364:9: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/nss.c:299:12: enter_function: entry to '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:310:12: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: call_function: calling 'strip_domain' from '_nss_name_to_gid'
nfs-utils-2.8.4/support/nfsidmap/nss.c:311:29: return_function: returning to '_nss_name_to_gid' from 'strip_domain'
nfs-utils-2.8.4/support/nfsidmap/nss.c:312:17: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:314:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:330:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:335:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:337:20: branch_true: following 'true' branch (when 'dostrip != 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:338:32: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:355:20: branch_false: following 'false' branch (when 'err != -34')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:359:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:359:18: branch_false: following 'false' branch (when 'err != -34')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:361:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:361:12: branch_false: following 'false' branch (when 'err == 0')...
nfs-utils-2.8.4/support/nfsidmap/nss.c:363:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:364:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/nss.c:364:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/nss.c:364:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/nss.c:364:9: danger: 'localname' leaks here; was allocated at [(16)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/15)
#  362|   		goto out_buf;
#  363|   	*gid = gr->gr_gid;
#  364|-> 	IDMAP_LOG(4, ("nss_name_to_gid: name '%s' gid %u", name, *gid));
#  365|   out_buf:
#  366|   	free(buf);

Error: CPPCHECK_WARNING (CWE-457): [#def211]
nfs-utils-2.8.4/support/nfsidmap/nss.c:415: error[uninitvar]: Uninitialized variable: r->field
#  413|   	realms = get_local_realms();
#  414|   	TAILQ_FOREACH(r, &realms->fields, link) {
#  415|-> 		if (strcmp(r->field, princ_realm) == 0) {
#  416|   			found = 1;
#  417|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
nfs-utils-2.8.4/support/nfsidmap/regex.c:84:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:365:12: enter_function: entry to 'regex_uid_to_name'
nfs-utils-2.8.4/support/nfsidmap/regex.c:373:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:374:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:376:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:376:12: branch_true: following 'true' branch (when 'domain' is NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:377:26: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:377:26: call_function: calling 'get_default_domain' from 'regex_uid_to_name'
#   82|           static char default_domain[NFS4_MAX_DOMAIN_LEN] = "";
#   83|           if (default_domain[0] == 0) {
#   84|->                 nfs4_get_default_domain(NULL, default_domain, NFS4_MAX_DOMAIN_LEN);
#   85|           }
#   86|           return default_domain;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:107:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: throw: if 'regexec' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  111|   	}
#  112|   
#  113|-> 	status = regexec(&user_re, name, MAX_MATCHES, matches, 0);
#  114|   	if (status) {
#  115|   		IDMAP_LOG(4, ("regexp_getpwnam: user '%s' did not match regex", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:107:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:115:17: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  113|   	status = regexec(&user_re, name, MAX_MATCHES, matches, 0);
#  114|   	if (status) {
#  115|-> 		IDMAP_LOG(4, ("regexp_getpwnam: user '%s' did not match regex", name));
#  116|   		err = ENOENT;
#  117|   		goto err_free_buf;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:107:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:120:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:122:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:126:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:132:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:134:12: branch_false: following 'false' branch (when 'localname' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:139:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: throw: if 'getpwnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  141|   
#  142|   again:
#  143|-> 	err = getpwnam_r(localname, &buf->pwbuf, buf->buf, buflen, &pw);
#  144|   
#  145|   	if (err == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:120:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:122:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:126:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:132:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:133:20: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:134:12: branch_false: following 'false' branch (when 'localname' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:139:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: throw: if 'getpwnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:143:15: danger: 'localname' leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  141|   
#  142|   again:
#  143|-> 	err = getpwnam_r(localname, &buf->pwbuf, buf->buf, buflen, &pw);
#  144|   
#  145|   	if (err == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
nfs-utils-2.8.4/support/nfsidmap/regex.c:152:17: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:120:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:122:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:126:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:132:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:133:20: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:134:12: branch_false: following 'false' branch (when 'localname' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:139:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:148:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:149:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:152:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:152:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:152:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:152:17: danger: 'localname' leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  150|   			err = ENOENT;
#  151|   
#  152|-> 		IDMAP_LOG(4, ("regex_getpwnam: local user '%s' for '%s' not found",
#  153|   		  localname, name));
#  154|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: warning[-Wanalyzer-malloc-leak]: leak of 'localname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:108:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:113:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:114:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:120:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:122:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:126:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:132:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:133:20: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:134:12: branch_false: following 'false' branch (when 'localname' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:139:33: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:148:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:158:9: danger: 'localname' leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  156|   	}
#  157|   
#  158|-> 	IDMAP_LOG(4, ("regexp_getpwnam: name '%s' mapped to '%s'",
#  159|   		  name, localname));
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: throw: if 'regexec' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  192|   	}
#  193|   
#  194|-> 	status = regexec(&group_re, name, MAX_MATCHES, matches, 0);
#  195|   	if (status) {
#  196|   		IDMAP_LOG(4, ("regexp_getgrnam: group '%s' did not match regex", name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:196:17: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  194|   	status = regexec(&group_re, name, MAX_MATCHES, matches, 0);
#  195|   	if (status) {
#  196|-> 		IDMAP_LOG(4, ("regexp_getgrnam: group '%s' did not match regex", name));
#  197|   		err = ENOENT;
#  198|   		goto err_free_buf;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  221|   	localgroup[namelen] = '\0';
#  222|   
#  223|-> 	IDMAP_LOG(4, ("regexp_getgrnam: group '%s' after match of regex", localgroup));
#  224|   
#  225|           groupname = localgroup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: warning[-Wanalyzer-malloc-leak]: leak of 'localgroup'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: danger: 'localgroup' leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  221|   	localgroup[namelen] = '\0';
#  222|   
#  223|-> 	IDMAP_LOG(4, ("regexp_getgrnam: group '%s' after match of regex", localgroup));
#  224|   
#  225|           groupname = localgroup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:229:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: throw: if 'regexec' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  228|   		err = 1;
#  229|   		if (use_gpx)
#  230|-> 			err = regexec(&gpx_re, localgroup, 0, NULL, 0);
#  231|   
#  232|   		if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: warning[-Wanalyzer-malloc-leak]: leak of 'localgroup'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:229:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: throw: if 'regexec' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: danger: 'localgroup' leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  228|   		err = 1;
#  229|   		if (use_gpx)
#  230|-> 			err = regexec(&gpx_re, localgroup, 0, NULL, 0);
#  231|   
#  232|   		if (err)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  232|   		if (err)
#  233|   		{
#  234|-> 			IDMAP_LOG(4, ("regexp_getgrnam: removing prefix '%s' (%d long) from group '%s'", group_name_prefix, group_name_prefix_length, localgroup));
#  235|   				groupname += group_name_prefix_length;
#  236|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: warning[-Wanalyzer-malloc-leak]: leak of 'localgroup'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:234:25: danger: 'localgroup' leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
#  232|   		if (err)
#  233|   		{
#  234|-> 			IDMAP_LOG(4, ("regexp_getgrnam: removing prefix '%s' (%d long) from group '%s'", group_name_prefix, group_name_prefix_length, localgroup));
#  235|   				groupname += group_name_prefix_length;
#  236|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:229:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:232:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  237|   		else
#  238|   		{
#  239|-> 			IDMAP_LOG(4, ("regexp_getgrnam: not removing prefix from group '%s'", localgroup));
#  240|   		}
#  241|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: warning[-Wanalyzer-malloc-leak]: leak of 'localgroup'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:229:20: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:230:31: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:232:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:239:25: danger: 'localgroup' leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
#  237|   		else
#  238|   		{
#  239|-> 			IDMAP_LOG(4, ("regexp_getgrnam: not removing prefix from group '%s'", localgroup));
#  240|   		}
#  241|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  241|   	}
#  242|   
#  243|-> 	IDMAP_LOG(4, ("regexp_getgrnam: will use '%s'", groupname));
#  244|   
#  245|   again:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: warning[-Wanalyzer-malloc-leak]: leak of 'groupname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: danger: 'groupname' leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
#  241|   	}
#  242|   
#  243|-> 	IDMAP_LOG(4, ("regexp_getgrnam: will use '%s'", groupname));
#  244|   
#  245|   again:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
nfs-utils-2.8.4/support/nfsidmap/regex.c:246:15: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:188:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:245:1: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:246:15: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:246:15: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  244|   
#  245|   again:
#  246|-> 	err = getgrnam_r(groupname, &buf->grbuf, buf->buf, buflen, &gr);
#  247|   
#  248|   	if (err == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
nfs-utils-2.8.4/support/nfsidmap/regex.c:255:17: warning[-Wanalyzer-malloc-leak]: leak of 'groupname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:245:1: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:248:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:251:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:251:12: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:252:20: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:255:17: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:255:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:255:17: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:255:17: danger: 'groupname' leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8)
#  253|   			err = ENOENT;
#  254|   
#  255|-> 		IDMAP_LOG(4, ("regex_getgrnam: local group '%s' for '%s' not found", groupname, name));
#  256|   
#  257|   		goto err_free_name;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: warning[-Wanalyzer-malloc-leak]: leak of 'groupname'
nfs-utils-2.8.4/support/nfsidmap/regex.c:189:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:194:18: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:195:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:201:25: branch_true: following 'true' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:203:21: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:207:12: branch_false: following 'false' branch (when 'index != 100')...
nfs-utils-2.8.4/support/nfsidmap/regex.c:213:19: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:214:22: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:215:12: branch_false: following 'false' branch (when 'localgroup' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:220:34: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:223:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:226:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:243:9: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:245:1: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:248:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:251:13: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:251:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: branch_true: following 'true' branch...
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:260:9: danger: 'groupname' leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  258|   	}
#  259|   
#  260|-> 	IDMAP_LOG(4, ("regex_getgrnam: group '%s' mapped to '%s'", name, groupname));
#  261|   
#  262|   	free(localgroup);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
nfs-utils-2.8.4/support/nfsidmap/regex.c:378:16: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:373:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:374:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:376:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:378:16: throw: if 'getpwuid_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:378:16: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  376|   	if (domain == NULL)
#  377|   		domain = get_default_domain();
#  378|-> 	err = -getpwuid_r(uid, &pwbuf, buf, buflen, &pw);
#  379|   	if (pw == NULL)
#  380|   		err = -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
nfs-utils-2.8.4/support/nfsidmap/regex.c:405:24: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/regex.c:402:23: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/regex.c:403:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/regex.c:405:24: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/regex.c:405:24: throw: if 'getgrgid_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/regex.c:405:24: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  403|   		if (!buf)
#  404|   			goto out;
#  405|-> 		err = -getgrgid_r(gid, &grbuf, buf, buflen, &gr);
#  406|   		if (gr == NULL && !err)
#  407|   			err = -ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
nfs-utils-2.8.4/support/nfsidmap/static.c:112:21: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/static.c:106:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:107:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:112:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:112:21: throw: if 'conf_get_str' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:112:21: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  110|   	}
#  111|   
#  112|-> 	localname = conf_get_str("Static", (char *)name);
#  113|   	if (!localname) {
#  114|   		err = ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
nfs-utils-2.8.4/support/nfsidmap/static.c:119:15: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/static.c:106:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:107:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:112:21: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:113:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:113:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:119:15: throw: if 'getpwnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:119:15: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  117|   
#  118|   again:
#  119|-> 	err = getpwnam_r(localname, &buf->pwbuf, buf->buf, buflen, &pw);
#  120|   
#  121|   	if (err == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
nfs-utils-2.8.4/support/nfsidmap/static.c:163:22: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/static.c:157:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:158:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:163:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:163:22: throw: if 'conf_get_str' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:163:22: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  161|   	}
#  162|   
#  163|-> 	localgroup = conf_get_str("Static", (char *)name);
#  164|   	if (!localgroup) {
#  165|   		err = ENOENT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
nfs-utils-2.8.4/support/nfsidmap/static.c:170:15: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
nfs-utils-2.8.4/support/nfsidmap/static.c:157:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:158:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:163:22: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:164:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:164:12: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:170:15: throw: if 'getgrnam_r' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:170:15: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  168|   
#  169|   again:
#  170|-> 	err = getgrnam_r(localgroup, &buf->grbuf, buf->buf, buflen, &gr);
#  171|   
#  172|   	if (err == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def240]
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
nfs-utils-2.8.4/support/nfsidmap/static.c:307:12: enter_function: entry to 'static_init'
nfs-utils-2.8.4/support/nfsidmap/static.c:318:21: branch_true: following 'true' branch (when 'i != 256')...
nfs-utils-2.8.4/support/nfsidmap/static.c:319:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:327:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:336:14: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:336:55: branch_true: following 'true' branch (when 'cln' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:338:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:340:22: call_function: calling 'static_getpwnam' from 'static_init'
nfs-utils-2.8.4/support/nfsidmap/static.c:340:22: return_function: returning to 'static_init' from 'static_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/static.c:341:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:345:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:346:20: branch_false: following 'false' branch (when 'unode' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:354:30: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:355:36: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: throw: if 'conf_get_str' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: danger: '<unknown>' leaks here; was allocated at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
#  355|   		unode->principal = strdup(cln->field);
#  356|   
#  357|-> 		unode->localname = conf_get_str("Static", cln->field);
#  358|   		if (!unode->localname) {
#  359|   			free(pw);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def241]
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: warning[-Wanalyzer-malloc-leak]: leak of 'unode'
nfs-utils-2.8.4/support/nfsidmap/static.c:307:12: enter_function: entry to 'static_init'
nfs-utils-2.8.4/support/nfsidmap/static.c:318:21: branch_true: following 'true' branch (when 'i != 256')...
nfs-utils-2.8.4/support/nfsidmap/static.c:319:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:327:12: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:336:14: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:336:55: branch_true: following 'true' branch (when 'cln' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:338:17: branch_true: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:340:22: call_function: calling 'static_getpwnam' from 'static_init'
nfs-utils-2.8.4/support/nfsidmap/static.c:340:22: return_function: returning to 'static_init' from 'static_getpwnam'
nfs-utils-2.8.4/support/nfsidmap/static.c:341:20: branch_false: following 'false' branch...
nfs-utils-2.8.4/support/nfsidmap/static.c:345:25: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:345:25: acquire_memory: allocated here
nfs-utils-2.8.4/support/nfsidmap/static.c:346:20: branch_false: following 'false' branch (when 'unode' is non-NULL)...
nfs-utils-2.8.4/support/nfsidmap/static.c:354:30: branch_false: ...to here
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: throw: if 'conf_get_str' throws an exception...
nfs-utils-2.8.4/support/nfsidmap/static.c:357:36: danger: 'unode' leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20)
#  355|   		unode->principal = strdup(cln->field);
#  356|   
#  357|-> 		unode->localname = conf_get_str("Static", cln->field);
#  358|   		if (!unode->localname) {
#  359|   			free(pw);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def242]
nfs-utils-2.8.4/support/nsm/file.c:828:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(nsm_make_record_pathname(directory,  hostname), "r")’
nfs-utils-2.8.4/support/nsm/file.c:981:1: enter_function: entry to ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: call_function: calling ‘nsm_make_record_pathname’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: return_function: returning to ‘nsm_delete_host’ from ‘nsm_make_record_pathname’
nfs-utils-2.8.4/support/nsm/file.c:992:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:997:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:997:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1003:29: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1006:12: branch_false: following ‘false’ branch (when ‘outbuf’ is non-NULL)...
nfs-utils-2.8.4/support/nsm/file.c:1011:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1011:13: acquire_resource: opened here
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1023:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1028:22: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1028:22: call_function: calling ‘nsm_parse_line’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:1028:22: return_function: returning to ‘nsm_delete_host’ from ‘nsm_parse_line’
nfs-utils-2.8.4/support/nsm/file.c:1028:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1029:25: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1029:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/file.c:828:41: danger: ‘fopen(nsm_make_record_pathname(directory,  hostname), "r")’ leaks here; was opened at [(18)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/17)
#  826|   			(unsigned int *)&m->mon_id.my_id.my_prog,
#  827|   			(unsigned int *)&m->mon_id.my_id.my_vers,
#  828|-> 			(unsigned int *)&m->mon_id.my_id.my_proc);
#  829|   	if (count != 4)
#  830|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
nfs-utils-2.8.4/support/nsm/file.c:828:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(nsm_make_record_pathname(directory,  hostname), "r")’
nfs-utils-2.8.4/support/nsm/file.c:981:1: enter_function: entry to ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: call_function: calling ‘nsm_make_record_pathname’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: return_function: returning to ‘nsm_delete_host’ from ‘nsm_make_record_pathname’
nfs-utils-2.8.4/support/nsm/file.c:992:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:997:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:997:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1003:29: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1006:12: branch_false: following ‘false’ branch (when ‘outbuf’ is non-NULL)...
nfs-utils-2.8.4/support/nsm/file.c:1011:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1011:13: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1023:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1028:22: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1028:22: call_function: calling ‘nsm_parse_line’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:1028:22: return_function: returning to ‘nsm_delete_host’ from ‘nsm_parse_line’
nfs-utils-2.8.4/support/nsm/file.c:1028:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1029:25: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1029:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/file.c:828:41: danger: ‘fopen(nsm_make_record_pathname(directory,  hostname), "r")’ leaks here; was allocated at [(18)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/17)
#  826|   			(unsigned int *)&m->mon_id.my_id.my_prog,
#  827|   			(unsigned int *)&m->mon_id.my_id.my_vers,
#  828|-> 			(unsigned int *)&m->mon_id.my_id.my_proc);
#  829|   	if (count != 4)
#  830|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
nfs-utils-2.8.4/support/nsm/file.c:912:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(nsm_make_record_pathname(directory,  filename), "r")’
nfs-utils-2.8.4/support/nsm/file.c:923:1: enter_function: entry to ‘nsm_load_dir’
nfs-utils-2.8.4/support/nsm/file.c:931:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:937:15: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:945:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:946:21: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:949:26: call_function: calling ‘nsm_load_host’ from ‘nsm_load_dir’
#  910|   	}
#  911|   	if (result == 0)
#  912|-> 		xlog(L_ERROR, "Failed to read monitor data from %s", path);
#  913|   
#  914|   	(void)fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
nfs-utils-2.8.4/support/nsm/file.c:912:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(nsm_make_record_pathname(directory,  filename), "r")’
nfs-utils-2.8.4/support/nsm/file.c:923:1: enter_function: entry to ‘nsm_load_dir’
nfs-utils-2.8.4/support/nsm/file.c:931:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:937:15: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:945:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:946:21: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:949:26: call_function: calling ‘nsm_load_host’ from ‘nsm_load_dir’
#  910|   	}
#  911|   	if (result == 0)
#  912|-> 		xlog(L_ERROR, "Failed to read monitor data from %s", path);
#  913|   
#  914|   	(void)fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
nfs-utils-2.8.4/support/nsm/file.c:945:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(generic_make_pathname(&nsm_base_dirname,  directory))’
nfs-utils-2.8.4/support/nsm/file.c:931:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:937:15: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:937:15: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:939:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:945:22: throw: if ‘readdir’ throws an exception...
nfs-utils-2.8.4/support/nsm/file.c:945:22: danger: ‘opendir(generic_make_pathname(&nsm_base_dirname,  directory))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  943|   	}
#  944|   
#  945|-> 	while ((de = readdir(dir)) != NULL) {
#  946|   		if (de->d_name[0] == '.')
#  947|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
nfs-utils-2.8.4/support/nsm/file.c:1013:17: warning[-Wanalyzer-malloc-leak]: leak of ‘outbuf’
nfs-utils-2.8.4/support/nsm/file.c:981:1: enter_function: entry to ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: call_function: calling ‘nsm_make_record_pathname’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: return_function: returning to ‘nsm_delete_host’ from ‘nsm_make_record_pathname’
nfs-utils-2.8.4/support/nsm/file.c:992:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:997:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:997:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1003:29: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1005:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/file.c:1006:12: branch_false: following ‘false’ branch (when ‘outbuf’ is non-NULL)...
nfs-utils-2.8.4/support/nsm/file.c:1011:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1013:17: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1013:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/file.c:1013:17: danger: ‘outbuf’ leaks here; was allocated at [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
# 1011|   	f = fopen(path, "r");
# 1012|   	if (f == NULL) {
# 1013|-> 		xlog(L_ERROR, "Failed to delete: "
# 1014|   			"could not open original file %s: %m", path);
# 1015|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
nfs-utils-2.8.4/support/nsm/file.c:1029:25: warning[-Wanalyzer-malloc-leak]: leak of ‘next’
nfs-utils-2.8.4/support/nsm/file.c:981:1: enter_function: entry to ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: call_function: calling ‘nsm_make_record_pathname’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:991:16: return_function: returning to ‘nsm_delete_host’ from ‘nsm_make_record_pathname’
nfs-utils-2.8.4/support/nsm/file.c:992:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:997:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:997:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1003:29: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1005:18: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/file.c:1006:12: branch_false: following ‘false’ branch (when ‘outbuf’ is non-NULL)...
nfs-utils-2.8.4/support/nsm/file.c:1011:13: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1012:12: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1023:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1028:22: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1028:22: call_function: calling ‘nsm_parse_line’ from ‘nsm_delete_host’
nfs-utils-2.8.4/support/nsm/file.c:1028:22: return_function: returning to ‘nsm_delete_host’ from ‘nsm_parse_line’
nfs-utils-2.8.4/support/nsm/file.c:1028:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/file.c:1029:25: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/file.c:1029:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/file.c:1029:25: danger: ‘next’ leaks here; was allocated at [(16)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/15)
# 1027|   
# 1028|   		if (!nsm_parse_line(line, &sin, &m)) {
# 1029|-> 			xlog(L_ERROR, "Failed to delete: "
# 1030|   				"could not parse original file %s", path);
# 1031|   			(void)fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
nfs-utils-2.8.4/support/nsm/rpc.c:128:9: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:330:1: enter_function: entry to ‘nsm_xmit_notify’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:350:9: call_function: calling ‘nsm_init_xdrmem’ from ‘nsm_xmit_notify’
#  126|   	memset(msgbuf, 0, (size_t)msgbuflen);
#  127|   	memset(xdrp, 0, sizeof(*xdrp));
#  128|-> 	xdrmem_create(xdrp, msgbuf, msgbuflen, XDR_ENCODE);
#  129|   }
#  130|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
nfs-utils-2.8.4/support/nsm/rpc.c:348:9: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:348:9: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/rpc.c:348:9: danger: ‘state_change.mon_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  346|   	state_change.state = state;
#  347|   
#  348|-> 	xlog(D_CALL, "Sending SM_NOTIFY for %s", mon_name);
#  349|   
#  350|   	nsm_init_xdrmem(msgbuf, NSM_MAXMSGSIZE, &xdr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
nfs-utils-2.8.4/support/nsm/rpc.c:353:13: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:353:13: throw: if ‘xdr_callmsg’ throws an exception...
nfs-utils-2.8.4/support/nsm/rpc.c:353:13: danger: ‘state_change.mon_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  351|   	xid = nsm_init_rpc_header(program, SM_VERS, SM_NOTIFY, &mesg);
#  352|   
#  353|-> 	if (xdr_callmsg(&xdr, &mesg) == TRUE &&
#  354|   	    xdr_stat_chge(&xdr, &state_change) == TRUE)
#  355|   		sent = nsm_rpc_sendto(sock, sap, salen, &xdr, msgbuf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
nfs-utils-2.8.4/support/nsm/rpc.c:354:13: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:353:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:354:13: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:354:13: throw: if ‘xdr_stat_chge’ throws an exception...
nfs-utils-2.8.4/support/nsm/rpc.c:354:13: danger: ‘state_change.mon_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  352|   
#  353|   	if (xdr_callmsg(&xdr, &mesg) == TRUE &&
#  354|-> 	    xdr_stat_chge(&xdr, &state_change) == TRUE)
#  355|   		sent = nsm_rpc_sendto(sock, sap, salen, &xdr, msgbuf);
#  356|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
nfs-utils-2.8.4/support/nsm/rpc.c:357:17: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:353:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:357:17: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:357:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/support/nsm/rpc.c:357:17: danger: ‘state_change.mon_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  355|   		sent = nsm_rpc_sendto(sock, sap, salen, &xdr, msgbuf);
#  356|   	else
#  357|-> 		xlog(L_ERROR, "%s: can't encode NSMPROC_NOTIFY call",
#  358|   				__func__);
#  359|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
nfs-utils-2.8.4/support/nsm/rpc.c:360:9: warning[-Wanalyzer-malloc-leak]: leak of ‘state_change.mon_name’
nfs-utils-2.8.4/support/nsm/rpc.c:341:33: acquire_memory: allocated here
nfs-utils-2.8.4/support/nsm/rpc.c:342:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:346:9: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:353:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:357:17: branch_false: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:360:9: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/nsm/rpc.c:360:9: branch_true: ...to here
nfs-utils-2.8.4/support/nsm/rpc.c:360:9: throw: if the called function throws an exception...
nfs-utils-2.8.4/support/nsm/rpc.c:360:9: danger: ‘state_change.mon_name’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  358|   				__func__);
#  359|   
#  360|-> 	xdr_destroy(&xdr);
#  361|   	free(state_change.mon_name);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def255]
nfs-utils-2.8.4/support/reexport/fsidd.c:191:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘srv’
nfs-utils-2.8.4/support/reexport/fsidd.c:158:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:162:21: branch_true: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:175:15: acquire_resource: socket created here
nfs-utils-2.8.4/support/reexport/fsidd.c:176:12: branch_false: following ‘false’ branch (when ‘srv != -1’)...
nfs-utils-2.8.4/support/reexport/fsidd.c:181:13: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:181:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:186:13: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:186:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:191:18: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:191:18: throw: if ‘event_base_new’ throws an exception...
nfs-utils-2.8.4/support/reexport/fsidd.c:191:18: danger: ‘srv’ leaks here
#  189|   	}
#  190|   
#  191|-> 	evbase = event_base_new();
#  192|   
#  193|   	srv_ev = event_new(evbase, srv, EV_READ | EV_PERSIST, srv_cb, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def256]
nfs-utils-2.8.4/support/reexport/fsidd.c:193:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘srv’
nfs-utils-2.8.4/support/reexport/fsidd.c:158:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:162:21: branch_true: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:175:15: acquire_resource: socket created here
nfs-utils-2.8.4/support/reexport/fsidd.c:176:12: branch_false: following ‘false’ branch (when ‘srv != -1’)...
nfs-utils-2.8.4/support/reexport/fsidd.c:181:13: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:181:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:186:13: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:186:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/support/reexport/fsidd.c:191:18: branch_false: ...to here
nfs-utils-2.8.4/support/reexport/fsidd.c:193:18: throw: if ‘event_new’ throws an exception...
nfs-utils-2.8.4/support/reexport/fsidd.c:193:18: danger: ‘srv’ leaks here
#  191|   	evbase = event_base_new();
#  192|   
#  193|-> 	srv_ev = event_new(evbase, srv, EV_READ | EV_PERSIST, srv_cb, NULL);
#  194|   	event_add(srv_ev, NULL);
#  195|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def257]
nfs-utils-2.8.4/support/reexport/reexport.c:52:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
nfs-utils-2.8.4/support/reexport/reexport.c:116:13: enter_function: entry to ‘do_fsidd_cmd’
nfs-utils-2.8.4/support/reexport/reexport.c:121:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/support/reexport/reexport.c:122:17: branch_true: ...to here
nfs-utils-2.8.4/support/reexport/reexport.c:123:21: call_function: calling ‘reexpdb_init’ from ‘do_fsidd_cmd’
#   50|   	}
#   51|   
#   52|-> 	ret = connect(s, (const struct sockaddr *)&addr, addr_len);
#   53|   	if (ret == -1) {
#   54|   		xlog(L_WARNING, "Unable to connect %s: %m, is fsidd running?\n", sock_file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def258]
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/cmdline", "r")’
nfs-utils-2.8.4/systemd/nfsroot-generator.c:51:13: acquire_resource: opened here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:52:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:13: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   53|   		return errno;
#   54|   
#   55|-> 	if (fgets(buf, sizeof(buf), f) == NULL)
#   56|   		return EIO;
#   57|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/cmdline", "r")’
nfs-utils-2.8.4/systemd/nfsroot-generator.c:51:13: acquire_memory: allocated here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:52:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:13: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: danger: ‘fopen("/proc/cmdline", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   53|   		return errno;
#   54|   
#   55|-> 	if (fgets(buf, sizeof(buf), f) == NULL)
#   56|   		return EIO;
#   57|   

Error: CPPCHECK_WARNING (CWE-404): [#def260]
nfs-utils-2.8.4/systemd/nfsroot-generator.c:56: error[resourceLeak]: Resource leak: f
#   54|   
#   55|   	if (fgets(buf, sizeof(buf), f) == NULL)
#   56|-> 		return EIO;
#   57|   
#   58|   	fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def261]
nfs-utils-2.8.4/systemd/nfsroot-generator.c:72:14: warning[-Wanalyzer-null-argument]: use of NULL ‘root’ where non-null expected
nfs-utils-2.8.4/systemd/nfsroot-generator.c:52:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:13: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:58:9: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:63:36: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:72:14: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:72:14: danger: argument 1 (‘root’) NULL where non-null expected
#   70|   	}
#   71|   
#   72|-> 	if (!strcmp(root, "/dev/nfs")) {
#   73|   		/* Require the nfsroot parameter with the pseudo-NFS-device */
#   74|   		if (!nfsroot)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def262]
nfs-utils-2.8.4/systemd/nfsroot-generator.c:132:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘comma’
nfs-utils-2.8.4/systemd/nfsroot-generator.c:52:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:13: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:55:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:58:9: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:63:36: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:64:22: branch_true: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:64:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:65:25: branch_true: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:63:36: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:72:14: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:72:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:79:25: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:80:20: branch_false: following ‘false’ branch (when ‘colon’ is non-NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:82:21: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:90:12: branch_false: following ‘false’ branch (when ‘slash’ is non-NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:93:13: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:93:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:94:21: branch_true: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:94:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:97:49: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:113:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:116:17: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:117:12: branch_true: following ‘true’ branch (when ‘colon’ is non-NULL)...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:118:47: branch_true: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:129:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/systemd/nfsroot-generator.c:132:14: branch_false: ...to here
nfs-utils-2.8.4/systemd/nfsroot-generator.c:132:20: danger: use of uninitialized value ‘comma’ here
#  130|   		return ENOMEM;
#  131|   
#  132|-> 	if ((colon || comma) && strlen(nfsroot) > 0) {
#  133|   		/* Skip checking <options> format */
#  134|   		info->options = strdup(nfsroot);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def263]
nfs-utils-2.8.4/systemd/systemd.c:103:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
nfs-utils-2.8.4/systemd/systemd.c:96:18: acquire_memory: this call could return NULL
nfs-utils-2.8.4/systemd/systemd.c:101:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/systemd/systemd.c:103:18: branch_true: ...to here
nfs-utils-2.8.4/systemd/systemd.c:103:17: danger: ‘result’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  101|   	if (!*path) {
#  102|   		/* root directory "/" becomes is encoded as a single "-" */
#  103|-> 		*p++ = '-';
#  104|   		goto out;
#  105|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def264]
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:74:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:76:17: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:74:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:242:1: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:126:12: branch_false: following ‘false’ branch (when ‘verbose == 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:128:9: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:132:12: branch_false: following ‘false’ branch (when ‘mode != 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:138:13: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:138:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:139:17: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:142:12: branch_true: following ‘true’ branch (when ‘mode == 4’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:144:23: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:147:20: branch_true: following ‘true’ branch (when ‘dumpfile’ is non-NULL)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:148:31: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:148:31: acquire_resource: opened here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:149:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:155:28: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:155:28: branch_false: following ‘false’ branch (when ‘verbose == 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: throw: if ‘conf_report’ throws an exception...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: danger: ‘out’ leaks here; was opened at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  158|   
#  159|   		/* output the configuration */
#  160|-> 		conf_report(out);
#  161|   
#  162|   		/* close that user specified file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘out’
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:74:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:76:17: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:74:20: branch_true: following ‘true’ branch (when ‘c == -1’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:242:1: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:126:12: branch_false: following ‘false’ branch (when ‘verbose == 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:128:9: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:132:12: branch_false: following ‘false’ branch (when ‘mode != 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:138:13: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:138:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:139:17: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:142:12: branch_true: following ‘true’ branch (when ‘mode == 4’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:144:23: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:147:20: branch_true: following ‘true’ branch (when ‘dumpfile’ is non-NULL)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:148:31: branch_true: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:148:31: acquire_memory: allocated here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:149:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:155:28: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:155:28: branch_false: following ‘false’ branch (when ‘verbose == 0’)...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: branch_false: ...to here
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: throw: if ‘conf_report’ throws an exception...
nfs-utils-2.8.4/tools/nfsconf/nfsconfcli.c:160:17: danger: ‘out’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  158|   
#  159|   		/* output the configuration */
#  160|-> 		conf_report(out);
#  161|   
#  162|   		/* close that user specified file */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def266]
nfs-utils-2.8.4/tools/nfsrahead/main.c:31:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*info.device_number’ where non-null expected
nfs-utils-2.8.4/tools/nfsrahead/main.c:75:12: enter_function: entry to ‘get_mountinfo’
nfs-utils-2.8.4/tools/nfsrahead/main.c:82:9: call_function: inlined call to ‘init_device_info’ from ‘get_mountinfo’
nfs-utils-2.8.4/tools/nfsrahead/main.c:83:20: call_function: calling ‘fill_device_number’ from ‘get_mountinfo’
#   29|   static int fill_device_number(struct device_info *info)
#   30|   {
#   31|-> 	char *s = strdup(info->device_number), *p;
#   32|   	char *maj_s, *min_s;
#   33|   	unsigned int maj, min;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def267]
nfs-utils-2.8.4/tools/nfsrahead/main.c:31:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘device.device_number’ where non-null expected
nfs-utils-2.8.4/tools/nfsrahead/main.c:138:5: enter_function: entry to ‘main’
nfs-utils-2.8.4/tools/nfsrahead/main.c:168:20: call_function: calling ‘get_device_info’ from ‘main’
#   29|   static int fill_device_number(struct device_info *info)
#   30|   {
#   31|-> 	char *s = strdup(info->device_number), *p;
#   32|   	char *maj_s, *min_s;
#   33|   	unsigned int maj, min;

Error: CPPCHECK_WARNING (CWE-476): [#def268]
nfs-utils-2.8.4/tools/nfsrahead/main.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#   35|   
#   36|   	maj_s = p = s;
#   37|-> 	for ( ; *p != ':' && *p != '\0'; p++)
#   38|   		;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def269]
nfs-utils-2.8.4/tools/nfsrahead/main.c:37:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
nfs-utils-2.8.4/tools/nfsrahead/main.c:31:19: acquire_memory: this call could return NULL
nfs-utils-2.8.4/tools/nfsrahead/main.c:37:17: danger: ‘p’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   35|   
#   36|   	maj_s = p = s;
#   37|-> 	for ( ; *p != ':' && *p != '\0'; p++)
#   38|   		;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:70:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#   68|   	READ32(sig->si_num_comps);
#   69|   	if (sig->si_num_comps == 0) {
#   70|-> 		BL_LOG_ERR("0 components in sig\n");
#   71|   		goto out_err;
#   72|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:70:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#   68|   	READ32(sig->si_num_comps);
#   69|   	if (sig->si_num_comps == 0) {
#   70|-> 		BL_LOG_ERR("0 components in sig\n");
#   71|   		goto out_err;
#   72|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#   72|   	}
#   73|   	if (sig->si_num_comps >= BLOCK_MAX_SIG_COMP) {
#   74|-> 		BL_LOG_ERR("number of sig comps %i >= BLOCK_MAX_SIG_COMP\n",
#   75|   			   sig->si_num_comps);
#   76|   		goto out_err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#   72|   	}
#   73|   	if (sig->si_num_comps >= BLOCK_MAX_SIG_COMP) {
#   74|-> 		BL_LOG_ERR("number of sig comps %i >= BLOCK_MAX_SIG_COMP\n",
#   75|   			   sig->si_num_comps);
#   76|   		goto out_err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:113:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  111|   	sig = (char *)malloc(siglen);
#  112|   	if (!sig) {
#  113|-> 		BL_LOG_ERR("%s: Out of memory\n", __func__);
#  114|   		goto out;
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:113:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  111|   	sig = (char *)malloc(siglen);
#  112|   	if (!sig) {
#  113|-> 		BL_LOG_ERR("%s: Out of memory\n", __func__);
#  114|   		goto out;
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  118|   		bs_offset += (((int64_t) disk->size) << 9);
#  119|   	if (lseek64(fd, bs_offset, SEEK_SET) == -1) {
#  120|-> 		BL_LOG_ERR("File %s lseek error\n", dev_name);
#  121|   		goto out;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:111:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:112:12: branch_false: following ‘false’ branch (when ‘sig’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:117:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:119:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: throw: if ‘syslog’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: danger: ‘sig’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  118|   		bs_offset += (((int64_t) disk->size) << 9);
#  119|   	if (lseek64(fd, bs_offset, SEEK_SET) == -1) {
#  120|-> 		BL_LOG_ERR("File %s lseek error\n", dev_name);
#  121|   		goto out;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  118|   		bs_offset += (((int64_t) disk->size) << 9);
#  119|   	if (lseek64(fd, bs_offset, SEEK_SET) == -1) {
#  120|-> 		BL_LOG_ERR("File %s lseek error\n", dev_name);
#  121|   		goto out;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  123|   
#  124|   	if (read(fd, sig, siglen) != siglen) {
#  125|-> 		BL_LOG_ERR("File %s read error\n", dev_name);
#  126|   		goto out;
#  127|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sig’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:111:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:112:12: branch_false: following ‘false’ branch (when ‘sig’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:117:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:119:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:124:13: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:124:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: throw: if ‘syslog’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: danger: ‘sig’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  123|   
#  124|   	if (read(fd, sig, siglen) != siglen) {
#  125|-> 		BL_LOG_ERR("File %s read error\n", dev_name);
#  126|   		goto out;
#  127|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  123|   
#  124|   	if (read(fd, sig, siglen) != siglen) {
#  125|-> 		BL_LOG_ERR("File %s read error\n", dev_name);
#  126|   		goto out;
#  127|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:146:14: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  144|   	int fd, i, rv;
#  145|   
#  146|-> 	fd = open(dev_name, O_RDONLY | O_LARGEFILE);
#  147|   	if (fd < 0) {
#  148|   		BL_LOG_ERR("%s: %s could not be opened for read\n", __func__,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:146:14: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  144|   	int fd, i, rv;
#  145|   
#  146|-> 	fd = open(dev_name, O_RDONLY | O_LARGEFILE);
#  147|   	if (fd < 0) {
#  148|   		BL_LOG_ERR("%s: %s could not be opened for read\n", __func__,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:148:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  146|   	fd = open(dev_name, O_RDONLY | O_LARGEFILE);
#  147|   	if (fd < 0) {
#  148|-> 		BL_LOG_ERR("%s: %s could not be opened for read\n", __func__,
#  149|   			   dev_name);
#  150|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:148:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  146|   	fd = open(dev_name, O_RDONLY | O_LARGEFILE);
#  147|   	if (fd < 0) {
#  148|-> 		BL_LOG_ERR("%s: %s could not be opened for read\n", __func__,
#  149|   			   dev_name);
#  150|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def286]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:155:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev_name, 0)’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:146:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:147:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:147:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:155:25: danger: ‘open(dev_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  153|   	rv = 1;
#  154|   
#  155|-> 	for (i = 0; i < sig->si_num_comps; i++) {
#  156|   		if (read_cmp_blk_sig(disk, fd, &sig->si_comps[i])) {
#  157|   			rv = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:163:17: warning[-Wanalyzer-malloc-leak]: leak of ‘arrays_ptr’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:34: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  161|   
#  162|   	if (fd >= 0)
#  163|-> 		close(fd);
#  164|   	return rv;
#  165|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:163:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  161|   
#  162|   	if (fd >= 0)
#  163|-> 		close(fd);
#  164|   	return rv;
#  165|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def289]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:291:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*vol_68->bv_vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: following ‘false’ branch (when ‘arrays’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:355:21: branch_true: following ‘true’ branch (when ‘i < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:356:21: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:357:26: call_function: calling ‘decode_blk_volume’ from ‘process_deviceinfo’
#  289|   			}
#  290|   		}
#  291|-> 		vol->bv_size = vol->bv_vols[0]->bv_size * vol->bv_vol_n;
#  292|   		break;
#  293|   	case BLOCK_VOLUME_CONCAT:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
nfs-utils-2.8.4/utils/blkmapd/device-process.c:351:17: warning[-Wanalyzer-malloc-leak]: leak of ‘vols’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:315:10: enter_function: entry to ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: call_function: inlined call to ‘blk_overflow’ from ‘process_deviceinfo’
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:328:9: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:329:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:331:12: branch_false: following ‘false’ branch (when ‘num_vols > 0’)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:334:36: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:335:12: branch_false: following ‘false’ branch (when ‘vols’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:348:41: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:350:12: branch_true: following ‘true’ branch (when ‘arrays’ is NULL)...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:351:17: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/device-process.c:351:17: throw: if ‘syslog’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/device-process.c:351:17: danger: ‘vols’ leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8)
#  349|   					sizeof(struct bl_volume *));
#  350|   	if (!arrays) {
#  351|-> 		BL_LOG_ERR("%s: Out of memory\n", __func__);
#  352|   		goto out_err;
#  353|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:213:12: enter_function: entry to ‘dm_device_remove’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:229:15: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:230:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:235:19: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:236:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:243:32: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:249:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:258:17: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:261:12: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:262:23: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:262:23: call_function: calling ‘dm_device_remove_byname’ from ‘dm_device_remove’
#  197|   	int ret = 0;
#  198|   
#  199|-> 	BL_LOG_INFO("%s: %s\n", __func__, dev_name);
#  200|   
#  201|   	dmt = dm_task_create(DM_DEVICE_REMOVE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:229:15: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:230:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:235:19: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:236:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:243:32: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:249:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: throw: if ‘dm_task_update_nodes’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  252|   	}
#  253|   
#  254|-> 	dm_task_update_nodes();
#  255|   
#  256|    out:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:229:15: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:230:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:235:19: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:236:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:243:32: acquire_memory: allocated here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:249:12: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:254:9: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:258:17: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:258:17: throw: if ‘dm_task_destroy’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:258:17: danger: ‘name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  256|    out:
#  257|   	if (dmt)
#  258|-> 		dm_task_destroy(dmt);
#  259|   
#  260|   	/* Start to remove device */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:395:39: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 552)’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:370:10: enter_function: entry to ‘dm_device_create’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:383:26: branch_true: following ‘true’ branch (when ‘volnum < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:384:29: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:391:33: call_function: inlined call to ‘bl_dm_table_alloc’ from ‘dm_device_create’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:392:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:395:39: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:397:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:401:25: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:403:25: throw: if ‘syslog’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:395:39: danger: ‘calloc(1, 552)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  393|   				goto out;
#  394|   			table->offset = 0;
#  395|-> 			table->size = node->bv_size;
#  396|   			strcpy(table->target_type, "linear");
#  397|   			if (!TYPE_HAS_DEV(node->bv_vols[0]->bv_type)) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def295]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:429:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pos’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:383:26: branch_true: following ‘true’ branch (when ‘volnum < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:384:29: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:418:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:422:39: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:429:31: danger: use of uninitialized value ‘pos’ here
#  427|   				(long long unsigned) stripe_unit, &pos);
#  428|   			/* Copy subdev major:minor to params */
#  429|-> 			tmp = table->params + pos;
#  430|   			len = DM_PARAMS_LEN - pos;
#  431|   			for (i = 0; i < node->bv_vol_n; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:458:47: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 552)’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:370:10: enter_function: entry to ‘dm_device_create’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:383:26: branch_true: following ‘true’ branch (when ‘volnum < num_vols’)...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:384:29: branch_true: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:453:37: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:454:41: call_function: inlined call to ‘bl_dm_table_alloc’ from ‘dm_device_create’
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:455:36: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:457:33: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:459:36: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:463:40: branch_false: ...to here
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:466:33: throw: if ‘syslog’ throws an exception...
nfs-utils-2.8.4/utils/blkmapd/dm-device.c:458:47: danger: ‘calloc(1, 552)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  456|   					goto out;
#  457|   				table->offset = size;
#  458|-> 				table->size = node->bv_vols[i]->bv_size;
#  459|   				if (!TYPE_HAS_DEV(node->bv_vols[i]->bv_type)) {
#  460|   					free(table);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def297]
nfs-utils-2.8.4/utils/exportfs/exportfs.c:501:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’
nfs-utils-2.8.4/utils/exportfs/exportfs.c:486:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:487:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:496:13: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:501:13: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:501:13: danger: ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  499|   		snprintf(buf, bufsiz-1, "nfsd 0.0.0.0 %d -test-client-\n", INT_MAX);
#  500|   
#  501|-> 	n = write(fd, buf, strlen(buf));
#  502|   	close(fd);
#  503|   	if (n < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
nfs-utils-2.8.4/utils/exportfs/exportfs.c:502:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’
nfs-utils-2.8.4/utils/exportfs/exportfs.c:486:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:487:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:496:13: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:502:9: danger: ‘open("/proc/net/rpc/auth.unix.ip/channel", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  500|   
#  501|   	n = write(fd, buf, strlen(buf));
#  502|-> 	close(fd);
#  503|   	if (n < 0)
#  504|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def299]
nfs-utils-2.8.4/utils/exportfs/exportfs.c:509:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/net/rpc/nfsd.export/channel", 1)’
nfs-utils-2.8.4/utils/exportfs/exportfs.c:487:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:496:13: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:503:12: branch_false: following ‘false’ branch (when ‘n >= 0’)...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:506:14: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:506:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:507:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:509:9: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:509:9: danger: ‘open("/proc/net/rpc/nfsd.export/channel", 1)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  507|   	if (fd < 0)
#  508|   		return 0;
#  509|-> 	close(fd);
#  510|   	return 1;
#  511|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
nfs-utils-2.8.4/utils/exportfs/exportfs.c:599:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cname’
nfs-utils-2.8.4/utils/exportfs/exportfs.c:594:17: acquire_memory: allocated here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:595:12: branch_false: following ‘false’ branch (when ‘cname’ is non-NULL)...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:598:1: branch_false: ...to here
nfs-utils-2.8.4/utils/exportfs/exportfs.c:599:14: throw: if ‘host_addrinfo’ throws an exception...
nfs-utils-2.8.4/utils/exportfs/exportfs.c:599:14: danger: ‘cname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  597|   
#  598|   out:
#  599|-> 	ai = host_addrinfo(cname);
#  600|   	free(cname);
#  601|   	return ai;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def301]
nfs-utils-2.8.4/utils/gssd/err_util.c:65:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
nfs-utils-2.8.4/utils/gssd/err_util.c:58:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/err_util.c:61:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/err_util.c:61:9: acquire_resource: ‘va_start’ called here
nfs-utils-2.8.4/utils/gssd/err_util.c:62:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/err_util.c:65:17: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/err_util.c:65:17: throw: if ‘xlog_backend’ throws an exception...
nfs-utils-2.8.4/utils/gssd/err_util.c:65:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   63|   		vfprintf(stderr, format, args);
#   64|   	else
#   65|-> 		xlog_backend(L_ERROR, format, args);
#   66|   	va_end(args);
#   67|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
nfs-utils-2.8.4/utils/gssd/gssd.c:179:14: warning[-Wanalyzer-malloc-leak]: leak of ‘protoname’
nfs-utils-2.8.4/utils/gssd/gssd.c:899:1: enter_function: entry to ‘gssd_inotify_clnt’
nfs-utils-2.8.4/utils/gssd/gssd.c:905:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:911:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:911:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:914:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:914:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:915:29: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:918:29: call_function: calling ‘gssd_scan_clnt’ from ‘gssd_inotify_clnt’
#  177|   #endif /* IPV6_SUPPORTED */
#  178|   
#  179|-> 	rc = getaddrinfo(node, port, &hints, &res);
#  180|   	if (rc) {
#  181|   		printerr(0, "ERROR: unable to convert %s|%s to sockaddr: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-457): [#def303]
nfs-utils-2.8.4/utils/gssd/gssd.c:370:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘program’
nfs-utils-2.8.4/utils/gssd/gssd.c:899:1: enter_function: entry to ‘gssd_inotify_clnt’
nfs-utils-2.8.4/utils/gssd/gssd.c:905:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:911:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:911:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:914:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:914:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/gssd.c:915:29: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/gssd.c:918:29: call_function: calling ‘gssd_scan_clnt’ from ‘gssd_inotify_clnt’
#  368|   	clp->upcall_address = address ? strdup(address) : NULL;
#  369|   	clp->upcall_port = port ? strdup(port) : NULL;
#  370|-> 	clp->upcall_program = program;
#  371|   	clp->upcall_vers = version;
#  372|   	clp->upcall_protoname = protoname ? strdup(protoname) : NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
nfs-utils-2.8.4/utils/gssd/gssd.c:767:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tdi’
nfs-utils-2.8.4/utils/gssd/gssd.c:862:1: enter_function: entry to ‘gssd_scan_cb’
nfs-utils-2.8.4/utils/gssd/gssd.c:864:9: call_function: calling ‘gssd_scan’ from ‘gssd_scan_cb’
#  765|   	tdi->wd = inotify_add_watch(inotify_fd, name, IN_CREATE);
#  766|   	if (tdi->wd < 0) {
#  767|-> 		printerr(0, "ERROR: %s: inotify_add_watch failed for top dir %s: %s\n",
#  768|   			 __FUNCTION__, tdi->name, strerror(errno));
#  769|   		free(tdi);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
nfs-utils-2.8.4/utils/gssd/gssd.c:811:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(openat(pipefs_fd, &*<unknown>.name, 0))’
nfs-utils-2.8.4/utils/gssd/gssd.c:862:1: enter_function: entry to ‘gssd_scan_cb’
nfs-utils-2.8.4/utils/gssd/gssd.c:864:9: call_function: calling ‘gssd_scan’ from ‘gssd_scan_cb’
#  809|   		clp->scanned = false;
#  810|   
#  811|-> 	while ((d = readdir(dir))) {
#  812|   		if (d->d_type != DT_DIR)
#  813|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:519:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pw_tmp’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:561:1: enter_function: entry to ‘krb5_not_machine_creds’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:573:20: call_function: calling ‘change_identity’ from ‘krb5_not_machine_creds’
#  517|   
#  518|   	/* try to get pwent for user */
#  519|-> 	res = getpwuid_r(uid, &pw, pw_tmp, tmplen, &ppw);
#  520|   	if (!ppw) {
#  521|   		/* if that doesn't work, try to get one for "nobody" */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:942:21: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_upcall_thread_info()’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:931:1: enter_function: entry to ‘start_upcall_thread’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:939:17: call_function: calling ‘alloc_upcall_thread_info’ from ‘start_upcall_thread’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:939:17: return_function: returning to ‘start_upcall_thread’ from ‘alloc_upcall_thread_info’
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:940:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:942:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:946:12: branch_true: following ‘true’ branch (when ‘ret != 0’)...
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:948:40: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:947:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/gssd_proc.c:942:21: danger: ‘alloc_upcall_thread_info()’ leaks here; was allocated at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
#  940|   	if (!tinfo)
#  941|   		return -ENOMEM;
#  942|-> 	tinfo->fd = info->fd;
#  943|   	tinfo->uid = info->uid;
#  944|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def308]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:381:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&cc_name, 0)’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:378:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:379:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:381:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:381:9: danger: ‘open(&cc_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  379|   	if (fd < 0)
#  380|   		return 1;
#  381|-> 	close(fd);
#  382|   	return 0;
#  383|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:443:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_alloc(context, & opts))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:443:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:443:17: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_alloc(context, & opts))’ leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
#  441|   	if (code) {
#  442|   		k5err = gssd_k5_err_msg(context, code);
#  443|-> 		printerr(0, "ERROR: %s allocating gic options\n", k5err);
#  444|   		goto out;
#  445|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:464:32: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_set_out_ccache(context,  opts,  ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:451:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:459:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:462:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:464:32: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_set_out_ccache(context,  opts,  ccache))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  462|   		printerr(1, "WARNING: %s while initializing ccache for "
#  463|   			 "principal '%s' using keytab '%s'\n", k5err,
#  464|-> 			 pname ? pname : "<unparsable>", kt_name);
#  465|   		goto out;
#  466|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:472:32: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_keytab(context, & my_creds, *ple.princ,  kt, 0, 0,  opts))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:451:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:459:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:467:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:467:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:470:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:472:32: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_keytab(context, & my_creds, *ple.princ,  kt, 0, 0,  opts))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
#  470|   		printerr(1, "WARNING: %s while getting initial ticket for "
#  471|   			 "principal '%s' using keytab '%s'\n", k5err,
#  472|-> 			 pname ? pname : "<unparsable>", kt_name);
#  473|   		goto out;
#  474|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:523:12: branch_false: following ‘false’ branch (when ‘ple’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:525:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:528:22: acquire_memory: allocated here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:533:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: throw: if ‘krb5_copy_principal’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  533|   	if (ple->realm == NULL)
#  534|   		goto outerr;
#  535|-> 	code = krb5_copy_principal(context, princ, &ple->princ);
#  536|   	if (code)
#  537|   		goto outerr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ple’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:522:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:523:12: branch_false: following ‘false’ branch (when ‘ple’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:525:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:533:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: throw: if ‘krb5_copy_principal’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:535:16: danger: ‘ple’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  533|   	if (ple->realm == NULL)
#  534|   		goto outerr;
#  535|-> 	code = krb5_copy_principal(context, princ, &ple->princ);
#  536|   	if (code)
#  537|   		goto outerr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:717:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_get_name(context,  kt, & kt_name, 8192))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:717:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:717:17: danger: ‘gssd_k5_err_msg(context,  krb5_kt_get_name(context,  kt, & kt_name, 8192))’ leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9)
#  715|   	if ((code = krb5_kt_get_name(context, kt, kt_name, BUFSIZ))) {
#  716|   		k5err = gssd_k5_err_msg(context, code);
#  717|-> 		printerr(0, "ERROR: %s attempting to get keytab name\n", k5err);
#  718|   		retval = code;
#  719|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:723:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_start_seq_get(context,  kt, & cursor))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:723:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:723:17: danger: ‘gssd_k5_err_msg(context,  krb5_kt_start_seq_get(context,  kt, & cursor))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
#  721|   	if ((code = krb5_kt_start_seq_get(context, kt, &cursor))) {
#  722|   		k5err = gssd_k5_err_msg(context, code);
#  723|-> 		printerr(0, "ERROR: %s while beginning keytab scan "
#  724|   			    "for keytab '%s'\n", k5err, kt_name);
#  725|   		retval = code;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:734:25: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_unparse_name(context, *kte.principal, & pname))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:729:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:730:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:731:56: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:731:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:734:25: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:734:25: danger: ‘gssd_k5_err_msg(context,  krb5_unparse_name(context, *kte.principal, & pname))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/15)
#  732|   					      &pname))) {
#  733|   			k5err = gssd_k5_err_msg(context, code);
#  734|-> 			printerr(0, "WARNING: Skipping keytab entry because "
#  735|   				 "we failed to unparse principal name: %s\n",
#  736|   				 k5err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:779:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_end_seq_get(context,  kt, & cursor))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:729:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:777:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:779:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:779:17: danger: ‘gssd_k5_err_msg(context,  krb5_kt_end_seq_get(context,  kt, & cursor))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/13)
#  777|   	if ((code = krb5_kt_end_seq_get(context, kt, &cursor))) {
#  778|   		k5err = gssd_k5_err_msg(context, code);
#  779|-> 		printerr(0, "WARNING: %s while ending keytab scan for "
#  780|   			    "keytab '%s'\n", k5err, kt_name);
#  781|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_resolve(context,  keytabfile, & kt))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1108:1: enter_function: entry to ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1130:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1134:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1135:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: return_function: returning to ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1145:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1145:17: danger: ‘gssd_k5_err_msg(context,  krb5_kt_resolve(context,  keytabfile, & kt))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
# 1143|   	if ((code = krb5_kt_resolve(context, keytabfile, &kt))) {
# 1144|   		k5err = gssd_k5_err_msg(context, code);
# 1145|-> 		printerr(0, "ERROR: %s: %s while resolving keytab '%s'\n",
# 1146|   			 __func__, k5err, keytabfile);
# 1147|   		goto out_free_context;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1204:17: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, & cc_name, & ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1108:1: enter_function: entry to ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1130:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1134:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1135:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1150:12: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1150:12: branch_false: following ‘false’ branch (when ‘ple’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1180:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1190:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1202:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: return_function: returning to ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1204:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1204:17: danger: ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, & cc_name, & ccache))’ leaks here; was allocated at [(18)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/17)
# 1202|   	if ((code = krb5_cc_resolve(context, cc_name, &ccache))) {
# 1203|   		k5err = gssd_k5_err_msg(context, code);
# 1204|-> 		printerr(0, "ERROR: %s while opening credential cache '%s'\n",
# 1205|   			 k5err, cc_name);
# 1206|   		goto out_free_kt;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1418:33: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, *gssd_k5_kt_princ_list.ccname, & ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1394:1: enter_function: entry to ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1403:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1410:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1411:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1413:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1415:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1416:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: return_function: returning to ‘gssd_destroy_krb5_principals’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1418:33: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1418:33: danger: ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, *gssd_k5_kt_princ_list.ccname, & ccache))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/13)
# 1416|   			if ((code = krb5_cc_resolve(context, ple->ccname, &ccache))) {
# 1417|   				k5err = gssd_k5_err_msg(context, code);
# 1418|-> 				printerr(0, "WARNING: %s while resolving credential "
# 1419|   					    "cache '%s' for destruction\n", k5err,
# 1420|   					    ple->ccname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1427:33: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_destroy(context,  ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1394:1: enter_function: entry to ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1403:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1410:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1411:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1413:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1415:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1425:29: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: return_function: returning to ‘gssd_destroy_krb5_principals’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1427:33: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1427:33: danger: ‘gssd_k5_err_msg(context,  krb5_cc_destroy(context,  ccache))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/13)
# 1425|   			if (!code && (code = krb5_cc_destroy(context, ccache))) {
# 1426|   				k5err = gssd_k5_err_msg(context, code);
# 1427|-> 				printerr(0, "WARNING: %s while destroying credential "
# 1428|   					    "cache '%s'\n", k5err, ple->ccname);
# 1429|   				free(k5err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1466:17: warning[-Wanalyzer-malloc-leak]: leak of ‘msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1463:12: branch_true: following ‘true’ branch (when ‘context’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1464:27: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1465:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1466:17: throw: if ‘krb5_free_error_message’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1466:17: danger: ‘msg’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 1464|   		origmsg = krb5_get_error_message(context, code);
# 1465|   		msg = strdup(origmsg);
# 1466|-> 		krb5_free_error_message(context, origmsg);
# 1467|   	}
# 1468|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(0, krb5_init_context(&context))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1394:1: enter_function: entry to ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1403:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1404:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1404:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1404:25: return_function: returning to ‘gssd_destroy_krb5_principals’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1405:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(0, krb5_init_context(&context))’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_destroy(context,  ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1394:1: enter_function: entry to ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1403:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1410:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1411:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1413:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1415:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1425:29: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1426:41: return_function: returning to ‘gssd_destroy_krb5_principals’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1427:33: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_cc_destroy(context,  ccache))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/11)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, & cc_name, & ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1108:1: enter_function: entry to ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1130:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1134:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1135:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1150:12: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1150:12: branch_false: following ‘false’ branch (when ‘ple’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1180:13: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1190:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1202:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1203:25: return_function: returning to ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1204:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, & cc_name, & ccache))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/15)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, *gssd_k5_kt_princ_list.ccname, & ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1394:1: enter_function: entry to ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1403:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1410:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1411:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1413:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1415:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1416:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_destroy_krb5_principals’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1417:41: return_function: returning to ‘gssd_destroy_krb5_principals’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1418:33: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_cc_resolve(context, *gssd_k5_kt_princ_list.ccname, & ccache))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/11)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_keytab(context, & my_creds, *ple.princ,  kt, 0, 0,  opts))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:451:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:459:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:467:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:467:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:469:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:470:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_keytab(context, & my_creds, *ple.princ,  kt, 0, 0,  opts))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/11)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_alloc(context, & opts))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:442:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:443:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_alloc(context, & opts))’ leaks here; was allocated at [(8)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/7)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_set_out_ccache(context,  opts,  ccache))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:396:1: enter_function: entry to ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:431:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:437:41: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:441:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:451:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:459:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_get_single_krb5_cred’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:461:25: return_function: returning to ‘gssd_get_single_krb5_cred’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:462:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_get_init_creds_opt_set_out_ccache(context,  opts,  ccache))’ leaks here; was allocated at [(10)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/9)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_end_seq_get(context,  kt, & cursor))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:729:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:777:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:778:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:779:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_kt_end_seq_get(context,  kt, & cursor))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/11)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_get_name(context,  kt, & kt_name, 8192))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:716:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:717:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_kt_get_name(context,  kt, & kt_name, 8192))’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_resolve(context,  keytabfile, & kt))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1108:1: enter_function: entry to ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1130:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1134:16: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1135:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1143:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_refresh_krb5_machine_credential_internal’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1144:25: return_function: returning to ‘gssd_refresh_krb5_machine_credential_internal’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1145:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_kt_resolve(context,  keytabfile, & kt))’ leaks here; was allocated at [(10)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/9)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_kt_start_seq_get(context,  kt, & cursor))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:722:25: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:723:17: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_kt_start_seq_get(context,  kt, & cursor))’ leaks here; was allocated at [(10)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/9)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gssd_k5_err_msg(context,  krb5_unparse_name(context, *kte.principal, & pname))’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:692:1: enter_function: entry to ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:704:12: branch_false: following ‘false’ branch (when ‘found’ is non-NULL)...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:708:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:715:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:21: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:721:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:729:9: branch_false: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:730:16: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:731:56: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:731:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: branch_true: ...to here
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: call_function: calling ‘gssd_k5_err_msg’ from ‘gssd_search_krb5_keytab’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:733:33: return_function: returning to ‘gssd_search_krb5_keytab’ from ‘gssd_k5_err_msg’
nfs-utils-2.8.4/utils/gssd/krb5_util.c:734:25: throw: if ‘printerr’ throws an exception...
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1472:16: danger: ‘gssd_k5_err_msg(context,  krb5_unparse_name(context, *kte.principal, & pname))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/13)
# 1470|   		return msg;
# 1471|   #if HAVE_KRB5
# 1472|-> 	return strdup(error_message(code));
# 1473|   #else
# 1474|   	if (context != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def335]
nfs-utils-2.8.4/utils/gssd/krb5_util.c:1594: error[memleakOnRealloc]: Common realloc mistake: 'allowed_enctypes' nulled but not freed upon failure
# 1592|   	if (allowed_etypes) {
# 1593|   		TAILQ_FOREACH(node, &(allowed_etypes->fields), link) {
# 1594|-> 			allowed_enctypes = realloc(allowed_enctypes,
# 1595|   						   (num_allowed_enctypes + 1) *
# 1596|   						   sizeof(*allowed_enctypes));

Error: GCC_ANALYZER_WARNING (CWE-479): [#def336]
nfs-utils-2.8.4/utils/idmapd/idmapd.c:179:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
nfs-utils-2.8.4/utils/idmapd/idmapd.c:225:1: enter_function: entry to ‘main’
nfs-utils-2.8.4/utils/idmapd/idmapd.c:270:12: branch_false: following ‘false’ branch (when ‘conf_path’ is NULL)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:291:17: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:338:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:341:9: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:345:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:347:21: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:349:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:351:21: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:358:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:361:18: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:362:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:365:13: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:368:12: branch_false: following ‘false’ branch (when ‘serverstart == 0’)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:377:12: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:377:12: branch_true: following ‘true’ branch (when ‘clientstart != 0’)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:378:32: branch_true: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:177:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:178:17: branch_true: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:179:17: danger: call to ‘exit’ from within signal handler
#  177|   	if (signal_received) {
#  178|   		xlog_warn("forced exiting on signal %d\n", signal);
#  179|-> 		exit(0);
#  180|   	}
#  181|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 2)’
nfs-utils-2.8.4/utils/idmapd/idmapd.c:194:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:195:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: danger: ‘open(path, 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  195|   	if (fd == -1)
#  196|   		return -1;
#  197|-> 	if (write(fd, stime, strlen(stime)) != (ssize_t)strlen(stime)) {
#  198|   		errx(1, "Flushing nfsd cache failed: errno %d (%s)",
#  199|   			errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def338]
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 2)’
nfs-utils-2.8.4/utils/idmapd/idmapd.c:194:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:195:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:197:13: danger: ‘open(path, 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  195|   	if (fd == -1)
#  196|   		return -1;
#  197|-> 	if (write(fd, stime, strlen(stime)) != (ssize_t)strlen(stime)) {
#  198|   		errx(1, "Flushing nfsd cache failed: errno %d (%s)",
#  199|   			errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
nfs-utils-2.8.4/utils/idmapd/idmapd.c:394:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/fs/nfs/idmap_cache_timeout", 2)’
nfs-utils-2.8.4/utils/idmapd/idmapd.c:270:12: branch_false: following ‘false’ branch (when ‘conf_path’ is NULL)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:291:17: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:338:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:341:9: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:345:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:347:21: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:349:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:351:21: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:358:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:361:18: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:362:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:365:13: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:368:12: branch_false: following ‘false’ branch (when ‘serverstart == 0’)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:377:12: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:377:12: branch_true: following ‘true’ branch (when ‘clientstart != 0’)...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:378:32: branch_true: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:383:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:386:43: branch_true: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:386:43: acquire_resource: opened here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:386:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:394:39: branch_false: ...to here
nfs-utils-2.8.4/utils/idmapd/idmapd.c:396:37: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/idmapd/idmapd.c:394:39: danger: ‘open("/proc/sys/fs/nfs/idmap_cache_timeout", 2)’ leaks here; was opened at [(19)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/18)
#  392|   					     cache_entry_expiration);
#  393|   			} else {
#  394|-> 				len = snprintf(timeout_buf, sizeof(timeout_buf),
#  395|   					       "%d", cache_entry_expiration);
#  396|   				if ((write(timeout_fd, timeout_buf, len)) != len)

Error: CPPCHECK_WARNING (CWE-476): [#def340]
nfs-utils-2.8.4/utils/mount/configfile.c:122: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: value
#  120|   	char *ch;
#  121|   
#  122|-> 	ch = &value[strlen(value)-1];
#  123|   	switch (tolower(*ch)) {
#  124|   	case 'k':

Error: GCC_ANALYZER_WARNING (CWE-688): [#def341]
nfs-utils-2.8.4/utils/mount/configfile.c:122:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘value’ where non-null expected
nfs-utils-2.8.4/utils/mount/configfile.c:206:1: enter_function: entry to ‘conf_parse_mntopts’
nfs-utils-2.8.4/utils/mount/configfile.c:220:9: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/configfile.c:224:25: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/configfile.c:257:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/configfile.c:259:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/configfile.c:259:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/configfile.c:268:28: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/configfile.c:268:27: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/configfile.c:273:34: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/configfile.c:273:34: acquire_memory: this call could return NULL
nfs-utils-2.8.4/utils/mount/configfile.c:274:31: call_function: calling ‘mountopts_convert’ from ‘conf_parse_mntopts’
#  120|   	char *ch;
#  121|   
#  122|-> 	ch = &value[strlen(value)-1];
#  123|   	switch (tolower(*ch)) {
#  124|   	case 'k':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: throw: if ‘mnt_fs_get_target’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  114|   	if ((p = mnt_fs_get_source(fs)))	/* spec */
#  115|   		src = strdup(p);
#  116|-> 	if ((p = mnt_fs_get_target(fs)))	/* mountpoint */
#  117|   		tgt = strdup(p);
#  118|   	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: throw: if ‘mnt_fs_get_fstype’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  116|   	if ((p = mnt_fs_get_target(fs)))	/* mountpoint */
#  117|   		tgt = strdup(p);
#  118|-> 	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */
#  119|   		type = strdup(p);
#  120|   	if ((p = mnt_fs_get_fs_options(fs)))	/* mount options */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: throw: if ‘mnt_fs_get_fstype’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  116|   	if ((p = mnt_fs_get_target(fs)))	/* mountpoint */
#  117|   		tgt = strdup(p);
#  118|-> 	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */
#  119|   		type = strdup(p);
#  120|   	if ((p = mnt_fs_get_fs_options(fs)))	/* mount options */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: throw: if ‘mnt_fs_get_fs_options’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  118|   	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */
#  119|   		type = strdup(p);
#  120|-> 	if ((p = mnt_fs_get_fs_options(fs)))	/* mount options */
#  121|   		opts = strdup(p);
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: throw: if ‘mnt_fs_get_fs_options’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  118|   	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */
#  119|   		type = strdup(p);
#  120|-> 	if ((p = mnt_fs_get_fs_options(fs)))	/* mount options */
#  121|   		opts = strdup(p);
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: throw: if ‘mnt_fs_get_fs_options’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  118|   	if ((p = mnt_fs_get_fstype(fs)))	/* FS type */
#  119|   		type = strdup(p);
#  120|-> 	if ((p = mnt_fs_get_fs_options(fs)))	/* mount options */
#  121|   		opts = strdup(p);
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: throw: if ‘mnt_context_get_mflags’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  121|   		opts = strdup(p);
#  122|   
#  123|-> 	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|   	fake = mnt_context_is_fake(cxt);
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: throw: if ‘mnt_context_get_mflags’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  121|   		opts = strdup(p);
#  122|   
#  123|-> 	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|   	fake = mnt_context_is_fake(cxt);
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: throw: if ‘mnt_context_get_mflags’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  121|   		opts = strdup(p);
#  122|   
#  123|-> 	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|   	fake = mnt_context_is_fake(cxt);
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: throw: if ‘mnt_context_is_fake’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  122|   
#  123|   	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|-> 	fake = mnt_context_is_fake(cxt);
#  125|   
#  126|   	if (string)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: throw: if ‘mnt_context_is_fake’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  122|   
#  123|   	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|-> 	fake = mnt_context_is_fake(cxt);
#  125|   
#  126|   	if (string)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: throw: if ‘mnt_context_is_fake’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:124:16: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  122|   
#  123|   	mnt_context_get_mflags(cxt, &flags);	/* mount(2) flags */
#  124|-> 	fake = mnt_context_is_fake(cxt);
#  125|   
#  126|   	if (string)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: throw: if ‘nfsmount_string’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  125|   
#  126|   	if (string)
#  127|-> 		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: throw: if ‘nfsmount_string’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  125|   
#  126|   	if (string)
#  127|-> 		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: throw: if ‘nfsmount_string’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  125|   
#  126|   	if (string)
#  127|-> 		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def357]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: warning[-Wanalyzer-null-argument]: use of NULL ‘type’ where non-null expected
nfs-utils-2.8.4/utils/mount/mount_libmount.c:105:55: release_memory: ‘opts’ is NULL
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: danger: argument 1 (‘type’) NULL where non-null expected
#  127|   		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|-> 	else if (strcmp(type, "nfs4") == 0)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def358]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘type’ where non-null expected
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: this call could return NULL
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: danger: argument 1 (‘type’) from [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  127|   		ret = nfsmount_string(src, tgt, type, flags, &opts, fake, bg);
#  128|   
#  129|-> 	else if (strcmp(type, "nfs4") == 0)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_true: following ‘true’ branch (when the strings are equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: throw: if ‘nfs4mount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)
#  130|-> 		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|   		ret = nfsmount(src, tgt, flags, &opts, fake, bg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_true: following ‘true’ branch (when the strings are equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: throw: if ‘nfs4mount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)
#  130|-> 		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|   		ret = nfsmount(src, tgt, flags, &opts, fake, bg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def361]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_true: following ‘true’ branch (when the strings are equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: throw: if ‘nfs4mount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:130:23: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  128|   
#  129|   	else if (strcmp(type, "nfs4") == 0)
#  130|-> 		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|   		ret = nfsmount(src, tgt, flags, &opts, fake, bg);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def362]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: throw: if ‘nfsmount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|-> 		ret = nfsmount(src, tgt, flags, &opts, fake, bg);
#  133|   
#  134|   	/* Store mount options if not called with mount --no-mtab */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: throw: if ‘nfsmount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|-> 		ret = nfsmount(src, tgt, flags, &opts, fake, bg);
#  133|   
#  134|   	/* Store mount options if not called with mount --no-mtab */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:119:24: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:129:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: throw: if ‘nfsmount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:132:23: danger: ‘type’ leaks here; was allocated at [(7)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/6)
#  130|   		ret = nfs4mount(src, tgt, flags, &opts, fake, bg);
#  131|   	else
#  132|-> 		ret = nfsmount(src, tgt, flags, &opts, fake, bg);
#  133|   
#  134|   	/* Store mount options if not called with mount --no-mtab */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: warning[-Wanalyzer-malloc-leak]: leak of ‘src’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:115:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: throw: if ‘mnt_context_is_nomtab’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: danger: ‘src’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  133|   
#  134|   	/* Store mount options if not called with mount --no-mtab */
#  135|-> 	if (!ret && !mnt_context_is_nomtab(cxt))
#  136|   		store_mount_options(fs, opts);
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: warning[-Wanalyzer-malloc-leak]: leak of ‘tgt’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:114:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:116:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:117:23: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:118:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:120:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:123:9: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:126:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:127:23: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:12: branch_true: following ‘true’ branch (when ‘ret == 0’)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: throw: if ‘mnt_context_is_nomtab’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:135:22: danger: ‘tgt’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  133|   
#  134|   	/* Store mount options if not called with mount --no-mtab */
#  135|-> 	if (!ret && !mnt_context_is_nomtab(cxt))
#  136|   		store_mount_options(fs, opts);
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:14: warning[-Wanalyzer-malloc-leak]: leak of ‘retrieve_mount_options(mnt_context_get_fs(cxt))’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:175:12: enter_function: entry to ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:209:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:210:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:218:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:222:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:223:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: call_function: calling ‘retrieve_mount_options’ from ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: return_function: returning to ‘umount_main’ from ‘retrieve_mount_options’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:14: throw: if ‘mnt_context_is_lazy’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:14: danger: ‘retrieve_mount_options(mnt_context_get_fs(cxt))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/15)
#  241|   	opts = retrieve_mount_options(mnt_context_get_fs(cxt));
#  242|   
#  243|-> 	if (!mnt_context_is_lazy(cxt)) {
#  244|   		if (opts) {
#  245|   			/* we have full FS description (e.g. from mtab or /proc) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def368]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: warning[-Wanalyzer-malloc-leak]: leak of ‘retrieve_mount_options(mnt_context_get_fs(cxt))’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:175:12: enter_function: entry to ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:209:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:210:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:218:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:222:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:223:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: call_function: calling ‘retrieve_mount_options’ from ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: return_function: returning to ‘umount_main’ from ‘retrieve_mount_options’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: throw: if ‘mnt_context_do_umount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: danger: ‘retrieve_mount_options(mnt_context_get_fs(cxt))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/15)
#  264|   
#  265|   	ret = EX_FILEIO;
#  266|-> 	rc = mnt_context_do_umount(cxt);	/* call umount(2) syscall */
#  267|   	mnt_context_finalize_mount(cxt);	/* mtab update */
#  268|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘retrieve_mount_options(mnt_context_get_fs(cxt))’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:175:12: enter_function: entry to ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:209:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:210:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:218:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:222:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:223:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: call_function: calling ‘retrieve_mount_options’ from ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: return_function: returning to ‘umount_main’ from ‘retrieve_mount_options’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:267:9: throw: if ‘mnt_context_finalize_mount’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:267:9: danger: ‘retrieve_mount_options(mnt_context_get_fs(cxt))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/15)
#  265|   	ret = EX_FILEIO;
#  266|   	rc = mnt_context_do_umount(cxt);	/* call umount(2) syscall */
#  267|-> 	mnt_context_finalize_mount(cxt);	/* mtab update */
#  268|   
#  269|   	if (rc && !mnt_context_get_status(cxt)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:20: warning[-Wanalyzer-malloc-leak]: leak of ‘retrieve_mount_options(mnt_context_get_fs(cxt))’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:175:12: enter_function: entry to ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:209:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:210:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:218:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:222:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:223:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: call_function: calling ‘retrieve_mount_options’ from ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: return_function: returning to ‘umount_main’ from ‘retrieve_mount_options’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:20: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:20: throw: if ‘mnt_context_get_status’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:20: danger: ‘retrieve_mount_options(mnt_context_get_fs(cxt))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/15)
#  267|   	mnt_context_finalize_mount(cxt);	/* mtab update */
#  268|   
#  269|-> 	if (rc && !mnt_context_get_status(cxt)) {
#  270|   		/* mnt_context_do_umount() returns errno if umount(2) failed */
#  271|   		umount_error(rc, spec);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
nfs-utils-2.8.4/utils/mount/mount_libmount.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘retrieve_mount_options(mnt_context_get_fs(cxt))’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:175:12: enter_function: entry to ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:209:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:210:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:12: branch_false: following ‘false’ branch (when ‘spec’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:212:23: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:218:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:222:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:223:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:229:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: call_function: calling ‘retrieve_mount_options’ from ‘umount_main’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:241:16: return_function: returning to ‘umount_main’ from ‘retrieve_mount_options’
nfs-utils-2.8.4/utils/mount/mount_libmount.c:243:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:266:14: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/mount_libmount.c:269:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:271:17: throw: if ‘umount_error’ throws an exception...
nfs-utils-2.8.4/utils/mount/mount_libmount.c:271:17: danger: ‘retrieve_mount_options(mnt_context_get_fs(cxt))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/15)
#  269|   	if (rc && !mnt_context_get_status(cxt)) {
#  270|   		/* mnt_context_do_umount() returns errno if umount(2) failed */
#  271|-> 		umount_error(rc, spec);
#  272|   		goto err;
#  273|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def372]
nfs-utils-2.8.4/utils/mount/network.c:376:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘so’
nfs-utils-2.8.4/utils/mount/network.c:1025:5: enter_function: entry to ‘clnt_ping’
nfs-utils-2.8.4/utils/mount/network.c:1035:16: call_function: calling ‘get_socket’ from ‘clnt_ping’
#  374|   	};
#  375|   
#  376|-> 	saved = fcntl(fd, F_GETFL, 0);
#  377|   	fcntl(fd, F_SETFL, saved | O_NONBLOCK);
#  378|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def373]
nfs-utils-2.8.4/utils/mount/network.c:1144:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nfs-utils-2.8.4/utils/mount/network.c:1117:16: acquire_resource: datagram socket created here
nfs-utils-2.8.4/utils/mount/network.c:1118:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
nfs-utils-2.8.4/utils/mount/network.c:1121:17: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/network.c:1144:9: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/utils/mount/network.c:1144:9: danger: ‘sock’ leaks here
# 1142|   
# 1143|   out:
# 1144|-> 	close(sock);
# 1145|   	return result;
# 1146|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def374]
nfs-utils-2.8.4/utils/mount/parse_dev.c:50:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:17: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: call_function: calling ‘nfs_parse_simple_hostname’ from ‘nfs_parse_devname’
#   48|   static int nfs_pdn_hostname_too_long_err(void)
#   49|   {
#   50|-> 	nfs_error(_("%s: server hostname is too long"), progname);
#   51|   	return 0;
#   52|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
nfs-utils-2.8.4/utils/mount/parse_dev.c:56:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: call_function: calling ‘nfs_parse_square_bracket’ from ‘nfs_parse_devname’
#   54|   static int nfs_pdn_pathname_too_long_err(void)
#   55|   {
#   56|-> 	nfs_error(_("%s: export pathname is too long"), progname);
#   57|   	return 0;
#   58|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
nfs-utils-2.8.4/utils/mount/parse_dev.c:62:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:17: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: call_function: calling ‘nfs_parse_simple_hostname’ from ‘nfs_parse_devname’
#   60|   static int nfs_pdn_bad_format_err(void)
#   61|   {
#   62|-> 	nfs_error(_("%s: remote share not in 'host:dir' format"), progname);
#   63|   	return 0;
#   64|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
nfs-utils-2.8.4/utils/mount/parse_dev.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: call_function: calling ‘nfs_parse_square_bracket’ from ‘nfs_parse_devname’
#   66|   static int nfs_pdn_nomem_err(void)
#   67|   {
#   68|-> 	nfs_error(_("%s: no memory available to parse devname"), progname);
#   69|   	return 0;
#   70|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
nfs-utils-2.8.4/utils/mount/parse_dev.c:74:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:225:26: call_function: calling ‘nfs_parse_square_bracket’ from ‘nfs_parse_devname’
#   72|   static int nfs_pdn_missing_brace_err(void)
#   73|   {
#   74|-> 	nfs_error(_("%s: closing bracket missing from server address"),
#   75|   				progname);
#   76|   	return 0;

Error: COMPILER_WARNING (CWE-704): [#def379]
nfs-utils-2.8.4/utils/mount/parse_dev.c: scope_hint: In function ‘nfs_parse_simple_hostname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:89:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   89 |         colon = strchr(dev, ':');
#      |               ^
#   87|   
#   88|   	/* Must have a colon */
#   89|-> 	colon = strchr(dev, ':');
#   90|   	if (colon == NULL)
#   91|   		return nfs_pdn_bad_format_err();

Error: COMPILER_WARNING (CWE-704): [#def380]
nfs-utils-2.8.4/utils/mount/parse_dev.c:89:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   87|   
#   88|   	/* Must have a colon */
#   89|-> 	colon = strchr(dev, ':');
#   90|   	if (colon == NULL)
#   91|   		return nfs_pdn_bad_format_err();

Error: COMPILER_WARNING (CWE-704): [#def381]
nfs-utils-2.8.4/utils/mount/parse_dev.c:100:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  100 |         comma = strchr(dev, ',');
#      |               ^
#   98|   	/* If there's a comma before the colon, take only the
#   99|   	 * first name in list */
#  100|-> 	comma = strchr(dev, ',');
#  101|   	if (comma != NULL) {
#  102|   		*comma = '\0';

Error: COMPILER_WARNING (CWE-704): [#def382]
nfs-utils-2.8.4/utils/mount/parse_dev.c:100:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   98|   	/* If there's a comma before the colon, take only the
#   99|   	 * first name in list */
#  100|-> 	comma = strchr(dev, ',');
#  101|   	if (comma != NULL) {
#  102|   		*comma = '\0';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
nfs-utils-2.8.4/utils/mount/parse_dev.c:104:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:17: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:229:26: call_function: calling ‘nfs_parse_simple_hostname’ from ‘nfs_parse_devname’
#  102|   		*comma = '\0';
#  103|   		host_len = comma - dev;
#  104|-> 		nfs_error(_("%s: warning: multiple hostnames not supported"),
#  105|   				progname);
#  106|   	} else

Error: COMPILER_WARNING (CWE-704): [#def384]
nfs-utils-2.8.4/utils/mount/parse_dev.c: scope_hint: In function ‘nfs_parse_square_bracket’
nfs-utils-2.8.4/utils/mount/parse_dev.c:146:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  146 |         cbrace = strchr(dev, ']');
#      |                ^
#  144|   
#  145|   	/* Must have a closing square bracket */
#  146|-> 	cbrace = strchr(dev, ']');
#  147|   	if (cbrace == NULL)
#  148|   		return nfs_pdn_missing_brace_err();

Error: COMPILER_WARNING (CWE-704): [#def385]
nfs-utils-2.8.4/utils/mount/parse_dev.c:146:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  144|   
#  145|   	/* Must have a closing square bracket */
#  146|-> 	cbrace = strchr(dev, ']');
#  147|   	if (cbrace == NULL)
#  148|   		return nfs_pdn_missing_brace_err();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
nfs-utils-2.8.4/utils/mount/parse_dev.c:192:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
nfs-utils-2.8.4/utils/mount/parse_dev.c:211:5: enter_function: entry to ‘nfs_parse_devname’
nfs-utils-2.8.4/utils/mount/parse_dev.c:217:12: branch_false: following ‘false’ branch (when ‘devname’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:221:15: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mount/parse_dev.c:222:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:224:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_dev.c:226:17: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_dev.c:227:26: call_function: inlined call to ‘nfs_parse_nfs_url’ from ‘nfs_parse_devname’
#  190|   			     __attribute__((unused)) char **pathname)
#  191|   {
#  192|-> 	nfs_error(_("%s: NFS URLs are not supported"), progname);
#  193|   	return 0;
#  194|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
nfs-utils-2.8.4/utils/mount/parse_opt.c:82:48: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: throw: if ‘next_token’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:82:48: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   80|   	opteq = strchr(str, '=');
#   81|   	if (opteq) {
#   82|-> 		option->keyword = strndup(str, opteq - str);
#   83|   		if (!option->keyword)
#   84|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
nfs-utils-2.8.4/utils/mount/parse_opt.c:178:9: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: throw: if ‘next_token’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
#  176|   	options->tail = option;
#  177|   
#  178|-> 	options->count++;
#  179|   }
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: throw: if ‘init_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
#  256|   	options = options_create();
#  257|   	if (options) {
#  258|-> 		tstate = init_tokenizer(str, ',');
#  259|   		for (opt = next_token(tstate); opt; opt = next_token(tstate)) {
#  260|   			struct mount_option *option = option_create(opt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:28: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:28: throw: if ‘next_token’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:28: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
#  257|   	if (options) {
#  258|   		tstate = init_tokenizer(str, ',');
#  259|-> 		for (opt = next_token(tstate); opt; opt = next_token(tstate)) {
#  260|   			struct mount_option *option = option_create(opt);
#  261|   			free(opt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: throw: if ‘next_token’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/22)
#  257|   	if (options) {
#  258|   		tstate = init_tokenizer(str, ',');
#  259|-> 		for (opt = next_token(tstate); opt; opt = next_token(tstate)) {
#  260|   			struct mount_option *option = option_create(opt);
#  261|   			free(opt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: throw: if ‘next_token’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:59: danger: ‘prev’ leaks here; was allocated at [(18)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/17)
#  257|   	if (options) {
#  258|   		tstate = init_tokenizer(str, ',');
#  259|-> 		for (opt = next_token(tstate); opt; opt = next_token(tstate)) {
#  260|   			struct mount_option *option = option_create(opt);
#  261|   			free(opt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: throw: if ‘tokenizer_error’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/22)
#  264|   			options_tail_insert(options, option);
#  265|   		}
#  266|-> 		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|   		end_tokenizer(tstate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: throw: if ‘tokenizer_error’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
#  264|   			options_tail_insert(options, option);
#  265|   		}
#  266|-> 		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|   		end_tokenizer(tstate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: throw: if ‘tokenizer_error’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: danger: ‘prev’ leaks here; was allocated at [(18)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/17)
#  264|   			options_tail_insert(options, option);
#  265|   		}
#  266|-> 		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|   		end_tokenizer(tstate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/22)
#  266|   		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|-> 		end_tokenizer(tstate);
#  269|   	}
#  270|   	return options;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/5)
#  266|   		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|-> 		end_tokenizer(tstate);
#  269|   	}
#  270|   	return options;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:268:17: danger: ‘prev’ leaks here; was allocated at [(18)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/17)
#  266|   		if (tokenizer_error(tstate))
#  267|   			goto fail;
#  268|-> 		end_tokenizer(tstate);
#  269|   	}
#  270|   	return options;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:267:25: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/22)
#  271|   
#  272|   fail:
#  273|-> 	end_tokenizer(tstate);
#  274|   	po_destroy(options);
#  275|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: warning[-Wanalyzer-malloc-leak]: leak of ‘options_create()’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:267:25: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: danger: ‘options_create()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/5)
#  271|   
#  272|   fail:
#  273|-> 	end_tokenizer(tstate);
#  274|   	po_destroy(options);
#  275|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: warning[-Wanalyzer-malloc-leak]: leak of ‘prev’
nfs-utils-2.8.4/utils/mount/parse_opt.c:247:23: enter_function: entry to ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:253:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: call_function: calling ‘options_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:256:19: return_function: returning to ‘po_split’ from ‘options_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:257:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:258:26: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_true: following ‘true’ branch (when ‘opt’ is non-NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: call_function: calling ‘option_create’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:260:55: return_function: returning to ‘po_split’ from ‘option_create’
nfs-utils-2.8.4/utils/mount/parse_opt.c:262:28: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:264:25: call_function: inlined call to ‘options_tail_insert’ from ‘po_split’
nfs-utils-2.8.4/utils/mount/parse_opt.c:259:48: branch_false: following ‘false’ branch (when ‘opt’ is NULL)...
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:21: branch_false: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:266:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mount/parse_opt.c:267:25: branch_true: ...to here
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: throw: if ‘end_tokenizer’ throws an exception...
nfs-utils-2.8.4/utils/mount/parse_opt.c:273:9: danger: ‘prev’ leaks here; was allocated at [(18)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/17)
#  271|   
#  272|   fail:
#  273|-> 	end_tokenizer(tstate);
#  274|   	po_destroy(options);
#  275|   	return NULL;

Error: COMPILER_WARNING (CWE-457): [#def402]
nfs-utils-2.8.4/utils/mount/parse_opt.c:491:21: warning[-Wmaybe-uninitialized]: 'version_key' may be used uninitialized
#  491 |         if (options && keyword) {
#      |                     ^
nfs-utils-2.8.4/utils/mount/network.c: scope_hint: In function 'nfs_nfs_version'
nfs-utils-2.8.4/utils/mount/network.c:1256:15: note: 'version_key' was declared here
# 1256 |         char *version_key, *version_val = NULL, *cptr;
#      |               ^
#  489|   	struct mount_option *option;
#  490|   
#  491|-> 	if (options && keyword) {
#  492|   		for (option = options->tail; option; option = option->prev)
#  493|   			if (strcmp(option->keyword, keyword) == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
nfs-utils-2.8.4/utils/mountd/rmtab.c:224:38: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
nfs-utils-2.8.4/utils/mountd/rmtab.c:189:1: enter_function: entry to ‘mountlist_list’
nfs-utils-2.8.4/utils/mountd/rmtab.c:198:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:200:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:200:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:206:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:206:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: call_function: calling ‘mountlist_freeall’ from ‘mountlist_list’
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: return_function: returning to ‘mountlist_list’ from ‘mountlist_freeall’
nfs-utils-2.8.4/utils/mountd/rmtab.c:212:24: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:213:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:213:29: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mountd/rmtab.c:214:28: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
nfs-utils-2.8.4/utils/mountd/rmtab.c:222:29: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:222:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:224:48: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:224:38: throw: if ‘host_pton’ throws an exception...
nfs-utils-2.8.4/utils/mountd/rmtab.c:224:38: danger: ‘m’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  222|   			if (reverse_resolve) {
#  223|   				struct addrinfo *ai;
#  224|-> 				ai = host_pton(rep->r_client);
#  225|   				if (ai != NULL) {
#  226|   					m->ml_hostname = host_canonname(ai->ai_addr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
nfs-utils-2.8.4/utils/mountd/rmtab.c:226:58: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
nfs-utils-2.8.4/utils/mountd/rmtab.c:189:1: enter_function: entry to ‘mountlist_list’
nfs-utils-2.8.4/utils/mountd/rmtab.c:198:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:200:18: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:200:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:206:13: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:206:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: call_function: calling ‘mountlist_freeall’ from ‘mountlist_list’
nfs-utils-2.8.4/utils/mountd/rmtab.c:207:17: return_function: returning to ‘mountlist_list’ from ‘mountlist_freeall’
nfs-utils-2.8.4/utils/mountd/rmtab.c:212:24: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:213:29: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:213:29: acquire_memory: allocated here
nfs-utils-2.8.4/utils/mountd/rmtab.c:214:28: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
nfs-utils-2.8.4/utils/mountd/rmtab.c:222:29: branch_false: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:222:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:224:48: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:225:36: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/mountd/rmtab.c:226:73: branch_true: ...to here
nfs-utils-2.8.4/utils/mountd/rmtab.c:226:58: throw: if ‘host_canonname’ throws an exception...
nfs-utils-2.8.4/utils/mountd/rmtab.c:226:58: danger: ‘m’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  224|   				ai = host_pton(rep->r_client);
#  225|   				if (ai != NULL) {
#  226|-> 					m->ml_hostname = host_canonname(ai->ai_addr);
#  227|   					nfs_freeaddrinfo(ai);
#  228|   				}

Error: CPPCHECK_WARNING (CWE-401): [#def405]
nfs-utils-2.8.4/utils/nfsd/nfsd.c:168: error[memleakOnRealloc]: Common realloc mistake: 'haddr' nulled but not freed upon failure
#  166|   	if (hosts && hosts->cnt) {
#  167|   		struct conf_list_node *n;
#  168|-> 		haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
#  169|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
#  170|   			haddr[hcounter] = n->field;

Error: CPPCHECK_WARNING (CWE-457): [#def406]
nfs-utils-2.8.4/utils/nfsd/nfsd.c:170: error[uninitvar]: Uninitialized variable: n->field
#  168|   		haddr = realloc(haddr, sizeof(char*) * hosts->cnt);
#  169|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
#  170|-> 			haddr[hcounter] = n->field;
#  171|   			hcounter++;
#  172|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def407]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:105:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 0)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:98:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:101:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:104:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:105:9: danger: ‘open("/proc/fs/nfsd/portlist", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  103|   
#  104|   	n = read(fd, buf, sizeof(buf));
#  105|-> 	close(fd);
#  106|   
#  107|   	xlog(D_GENERAL, "knfsd is currently %s", (n > 0) ? "up" : "down");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def408]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: throw: if ‘getaddrinfo’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: danger: ‘open("/proc/fs/nfsd/portlist", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  125|   		return 0;
#  126|   
#  127|-> 	rc = getaddrinfo(node, port, hints, &addrhead);
#  128|   	if (rc == EAI_NONAME && !strcmp(port, "nfs")) {
#  129|   		snprintf(buf, sizeof(buf), "%d", NFS_PORT);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def409]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:130:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:128:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:130:22: throw: if ‘getaddrinfo’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:130:22: danger: ‘open("/proc/fs/nfsd/portlist", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  128|   	if (rc == EAI_NONAME && !strcmp(port, "nfs")) {
#  129|   		snprintf(buf, sizeof(buf), "%d", NFS_PORT);
#  130|-> 		rc = getaddrinfo(node, buf, hints, &addrhead);
#  131|   	}
#  132|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def410]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:134:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_true: following ‘true’ branch (when ‘rc != 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:134:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:134:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:134:17: danger: ‘open("/proc/fs/nfsd/portlist", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|   	if (rc != 0) {
#  134|-> 		xlog(L_ERROR, "unable to resolve %s:%s: %s",
#  135|   			node ? node : "ANYADDR", port,
#  136|   			rc == EAI_SYSTEM ? strerror(errno) :

Error: GCC_ANALYZER_WARNING (CWE-775): [#def411]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:175:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_true: following ‘true’ branch (when ‘sockfd < 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:174:29: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:175:33: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:175:33: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  173|   		if (sockfd < 0) {
#  174|   			if (errno != EAFNOSUPPORT) {
#  175|-> 				xlog(L_ERROR, "unable to create %s %s socket: "
#  176|   				     "errno %d (%m)", family, proto, errno);
#  177|   				rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def412]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  182|   		}
#  183|   
#  184|-> 		xlog(D_GENERAL, "Created %s %s socket.", family, proto);
#  185|   
#  186|   #ifdef IPV6_SUPPORTED

Error: GCC_ANALYZER_WARNING (CWE-775): [#def413]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:171:26: acquire_resource: socket created here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: danger: ‘sockfd’ leaks here
#  182|   		}
#  183|   
#  184|-> 		xlog(D_GENERAL, "Created %s %s socket.", family, proto);
#  185|   
#  186|   #ifdef IPV6_SUPPORTED

Error: GCC_ANALYZER_WARNING (CWE-775): [#def414]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:189:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:187:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:188:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:187:21: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:190:52: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:189:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:189:25: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  187|   		if (addr->ai_family == AF_INET6 &&
#  188|   		    setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on))) {
#  189|-> 			xlog(L_ERROR, "unable to set IPV6_V6ONLY: "
#  190|   				"errno %d (%m)\n", errno);
#  191|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def415]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:195:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:196:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:195:21: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:198:66: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:197:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:197:25: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  195|   		if (addr->ai_protocol == IPPROTO_TCP &&
#  196|   		    setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on))) {
#  197|-> 			xlog(L_ERROR, "unable to set SO_REUSEADDR on %s "
#  198|   				"socket: errno %d (%m)", family, errno);
#  199|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def416]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:203:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:204:65: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:203:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:203:25: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  201|   		}
#  202|   		if (bind(sockfd, addr->ai_addr, addr->ai_addrlen)) {
#  203|-> 			xlog(L_ERROR, "unable to bind %s %s socket: "
#  204|   				"errno %d (%m)", family, proto, errno);
#  205|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def417]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:195:21: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:209:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:211:50: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  208|   		if (addr->ai_protocol == IPPROTO_TCP &&
#  209|   		    listen(sockfd, SOMAXCONN)) {
#  210|-> 			xlog(L_ERROR, "unable to create listening socket: "
#  211|   				"errno %d (%m)", errno);
#  212|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def418]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:171:26: acquire_resource: socket created here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:195:21: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:209:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:211:50: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:210:25: danger: ‘sockfd’ leaks here
#  208|   		if (addr->ai_protocol == IPPROTO_TCP &&
#  209|   		    listen(sockfd, SOMAXCONN)) {
#  210|-> 			xlog(L_ERROR, "unable to create listening socket: "
#  211|   				"errno %d (%m)", errno);
#  212|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def419]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:226:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:216:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:225:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:226:21: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:226:21: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  224|   
#  225|   		snprintf(buf, sizeof(buf), "%d\n", sockfd); 
#  226|-> 		if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
#  227|   			/*
#  228|   			 * this error may be common on older kernels that don't

Error: GCC_ANALYZER_WARNING (CWE-775): [#def420]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:233:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:216:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:225:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:226:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:231:29: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:233:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:233:25: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  231|   			if (errno == EAFNOSUPPORT)
#  232|   				fac = D_ALL;
#  233|-> 			xlog(fac, "writing fd to kernel failed: errno %d (%m)",
#  234|   				  errno);
#  235|   			rc = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def421]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:240:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_false: following ‘false’ branch (when ‘rc == 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:141:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:142:15: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:144:24: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:173:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:184:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:202:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:208:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:216:20: branch_false: following ‘false’ branch (when ‘fd != -1’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:225:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:226:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:238:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:240:17: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:240:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  238|   		bounded++;
#  239|   
#  240|-> 		close(fd);
#  241|   		close(sockfd);
#  242|   		sockfd = fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def422]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:247:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:123:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:124:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:127:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:133:12: branch_true: following ‘true’ branch (when ‘rc != 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:134:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:246:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:247:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:247:17: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:247:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  245|   error:
#  246|   	if (fd >= 0)
#  247|-> 		close(fd);
#  248|   	if (sockfd >= 0)
#  249|   		close(sockfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def423]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:302:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:297:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:298:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:300:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:302:13: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:302:13: danger: ‘open("/proc/fs/nfsd/portlist", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  300|   	snprintf(buf, sizeof(buf), "rdma %d", nport);
#  301|   	ret = 0;
#  302|-> 	if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
#  303|   		ret= errno;
#  304|   		xlog(L_ERROR, "Unable to request RDMA services: %m");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def424]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:302:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/portlist", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:297:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:298:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:300:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:302:13: danger: ‘open("/proc/fs/nfsd/portlist", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  300|   	snprintf(buf, sizeof(buf), "rdma %d", nport);
#  301|   	ret = 0;
#  302|-> 	if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
#  303|   		ret= errno;
#  304|   		xlog(L_ERROR, "Unable to request RDMA services: %m");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def425]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:319:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:320:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: danger: ‘open(&pathbuf, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  319|   	fd = open(pathbuf, O_WRONLY);
#  320|   	if (fd >= 0) {
#  321|-> 		if (write(fd, nbuf, strlen(nbuf)) != (ssize_t)strlen(nbuf))
#  322|   			xlog(L_ERROR, "Unable to set nfsv4%stime: %m", type);
#  323|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def426]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:319:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:320:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:322:25: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:322:25: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:321:21: danger: ‘open(&pathbuf, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  319|   	fd = open(pathbuf, O_WRONLY);
#  320|   	if (fd >= 0) {
#  321|-> 		if (write(fd, nbuf, strlen(nbuf)) != (ssize_t)strlen(nbuf))
#  322|   			xlog(L_ERROR, "Unable to set nfsv4%stime: %m", type);
#  323|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def427]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/fs/nfs/nlm_grace_period", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:325:12: branch_true: following ‘true’ branch (when the strings are equal)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:327:22: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:327:22: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:328:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: danger: ‘open("/proc/sys/fs/nfs/nlm_grace_period", 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  327|   		fd = open("/proc/sys/fs/nfs/nlm_grace_period", O_WRONLY);
#  328|   		if (fd >= 0) {
#  329|-> 			if (write(fd, nbuf, strlen(nbuf)) != (ssize_t)strlen(nbuf))
#  330|   				xlog(L_ERROR, "Unable to write nlm_grace_period : %m");
#  331|   			close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def428]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/sys/fs/nfs/nlm_grace_period", 1)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:325:12: branch_true: following ‘true’ branch (when the strings are equal)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:327:22: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:327:22: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:328:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:28: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:330:33: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:330:33: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:329:29: danger: ‘open("/proc/sys/fs/nfs/nlm_grace_period", 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
#  327|   		fd = open("/proc/sys/fs/nfs/nlm_grace_period", O_WRONLY);
#  328|   		if (fd >= 0) {
#  329|-> 			if (write(fd, nbuf, strlen(nbuf)) != (ssize_t)strlen(nbuf))
#  330|   				xlog(L_ERROR, "Unable to write nlm_grace_period : %m");
#  331|   			close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def429]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:349:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/versions", 0)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:343:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:344:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:347:16: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:348:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:349:73: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:349:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:349:17: danger: ‘open("/proc/fs/nfsd/versions", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  347|   	size = read(fd, buf, sizeof(buf));
#  348|   	if (size < 0) {
#  349|-> 		xlog(L_ERROR, "Getting versions failed: errno %d (%m)", errno);
#  350|   		goto out;
#  351|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def430]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:352:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/versions", 0)’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:343:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:344:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:347:16: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:348:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:352:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:357:20: branch_true: following ‘true’ branch (when ‘token’ is NULL)...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:369:1: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:352:12: danger: ‘open("/proc/fs/nfsd/versions", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  350|   		goto out;
#  351|   	}
#  352|-> 	ptr[size] = '\0';
#  353|   	for (;;) {
#  354|   		unsigned vers, minor = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def431]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:431:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:423:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:424:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:430:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:431:21: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:431:21: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  429|   		 */
#  430|   		snprintf(buf, sizeof(buf), "%d\n", nrservs);
#  431|-> 		n = write(fd, buf, strlen(buf));
#  432|   		close(fd);
#  433|   		if (n != (ssize_t)strlen(buf))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def432]
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:432:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:423:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:424:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:430:17: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:432:17: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/utils/nfsd/nfssvc.c:432:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#  430|   		snprintf(buf, sizeof(buf), "%d\n", nrservs);
#  431|   		n = write(fd, buf, strlen(buf));
#  432|-> 		close(fd);
#  433|   		if (n != (ssize_t)strlen(buf))
#  434|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def433]
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:62:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/nfsv4recoverydir", 0)’
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:56:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:57:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:61:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:62:9: danger: ‘open("/proc/fs/nfsd/nfsv4recoverydir", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   60|   	}
#   61|   	n = read(fd, recdirname, PATH_MAX);
#   62|-> 	close(fd);
#   63|   	if (n < 0) {
#   64|   		xlog(D_GENERAL, "Unable to read from %s: %m", NFSD_RECDIR_FILE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:76:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&recdirname)’
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:57:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:61:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:63:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:68:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:70:12: branch_false: following ‘false’ branch (when ‘nl’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:72:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:73:22: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:74:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:74:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:76:25: throw: if ‘readdir’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:76:25: danger: ‘opendir(&recdirname)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#   74|   	if (!v4recovery)
#   75|   		return;
#   76|-> 	while ((entry = readdir(v4recovery))) {
#   77|   		int ret;
#   78|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def435]
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:130:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/nfsv4recoverydir", 0)’
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:124:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:125:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:129:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:130:9: danger: ‘open("/proc/fs/nfsd/nfsv4recoverydir", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  128|   	}
#  129|   	n = read(fd, recdirname, PATH_MAX);
#  130|-> 	close(fd);
#  131|   	if (n < 0) {
#  132|   		xlog(D_GENERAL, "Unable to read from %s: %m", NFSD_RECDIR_FILE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:144:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&recdirname)’
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:125:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:129:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:131:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:136:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:138:12: branch_false: following ‘false’ branch (when ‘nl’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:140:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:141:22: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:142:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:142:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:144:25: throw: if ‘readdir’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/legacy.c:144:25: danger: ‘opendir(&recdirname)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  142|   	if (!v4recovery)
#  143|   		return;
#  144|-> 	while ((entry = readdir(v4recovery))) {
#  145|   		int len;
#  146|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:213:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dirc’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:205:16: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:206:12: branch_false: following ‘false’ branch (when ‘dirc’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:211:16: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:212:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:213:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:213:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:213:17: danger: ‘dirc’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  211|   	rret = read(inotify_fd, evbuf, INOTIFY_EVENT_MAX);
#  212|   	if (rret < 0) {
#  213|-> 		xlog(L_ERROR, "%s: read from inotify fd failed: %m", __func__);
#  214|   		goto out;
#  215|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def438]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:219:17: warning[-Wanalyzer-malloc-leak]: leak of ‘dirc’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:205:16: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:206:12: branch_false: following ‘false’ branch (when ‘dirc’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:211:16: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:212:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:218:14: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:218:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:219:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:219:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:219:17: danger: ‘dirc’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  217|   	/* check to see if we have a filename in the evbuf */
#  218|   	if (!event->len) {
#  219|-> 		xlog(D_GENERAL, "%s: no filename in inotify event", __func__);
#  220|   		goto out;
#  221|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:250:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dirc’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:205:16: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:206:12: branch_false: following ‘false’ branch (when ‘dirc’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:211:16: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:250:9: throw: if ‘event_add’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:250:9: danger: ‘dirc’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  248|   
#  249|   out:
#  250|-> 	event_add(pipedir_event, NULL);
#  251|   	free(dirc);
#  252|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def440]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:363:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/v4_end_grace", 0)’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:356:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:357:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:363:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:363:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:363:17: danger: ‘open("/proc/fs/nfsd/v4_end_grace", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  361|   	}
#  362|   	if (read(fd, &c, 1) < 0) {
#  363|-> 		xlog(L_WARNING, "Unable to read from %s: %m",
#  364|   			NFSD_END_GRACE_FILE);
#  365|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def441]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:365:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/v4_end_grace", 0)’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:356:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:357:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:363:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:365:17: danger: ‘open("/proc/fs/nfsd/v4_end_grace", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  363|   		xlog(L_WARNING, "Unable to read from %s: %m",
#  364|   			NFSD_END_GRACE_FILE);
#  365|-> 		close(fd);
#  366|   		return 1;
#  367|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def442]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:368:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/nfsd/v4_end_grace", 0)’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:356:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:357:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:362:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:368:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:368:9: danger: ‘open("/proc/fs/nfsd/v4_end_grace", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  366|   		return 1;
#  367|   	}
#  368|-> 	close(fd);
#  369|   	if (c == 'N') {
#  370|   		xlog(L_WARNING, "nfsd is in grace but didn't send a gracestart upcall, "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def443]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: throw: if ‘event_base_new’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  820|   	}
#  821|   
#  822|-> 	evbase = event_base_new();
#  823|   	if (evbase == NULL) {
#  824|   		fprintf(stderr, "%s: unable to allocate event base.\n", argv[0]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: throw: if ‘xlog_syslog’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  826|   		return 1;
#  827|   	}
#  828|-> 	xlog_syslog(0);
#  829|   	xlog_stderr(1);
#  830|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:829:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:829:9: throw: if ‘xlog_stderr’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:829:9: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  827|   	}
#  828|   	xlog_syslog(0);
#  829|-> 	xlog_stderr(1);
#  830|   
#  831|   	conf_init_file(NFS_CONFFILE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:831:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:831:9: throw: if ‘conf_init_file’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:831:9: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  829|   	xlog_stderr(1);
#  830|   
#  831|-> 	conf_init_file(NFS_CONFFILE);
#  832|   	s = conf_get_str("general", "pipefs-directory");
#  833|   	if (s)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:832:13: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:832:13: throw: if ‘conf_get_str’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:832:13: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  830|   
#  831|   	conf_init_file(NFS_CONFFILE);
#  832|-> 	s = conf_get_str("general", "pipefs-directory");
#  833|   	if (s)
#  834|   		strlcpy(pipefs_dir, s, sizeof(pipefs_dir));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:835:13: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:835:13: throw: if ‘conf_get_str’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:835:13: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  833|   	if (s)
#  834|   		strlcpy(pipefs_dir, s, sizeof(pipefs_dir));
#  835|-> 	s = conf_get_str("nfsdcld", "storagedir");
#  836|   	if (s)
#  837|   		storagedir = s;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:838:14: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:838:14: throw: if ‘conf_get_num’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:838:14: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  836|   	if (s)
#  837|   		storagedir = s;
#  838|-> 	rc = conf_get_num("nfsdcld", "debug", 0);
#  839|   	if (rc > 0)
#  840|   		xlog_config(D_ALL, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:840:17: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:839:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:840:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:840:17: throw: if ‘xlog_config’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:840:17: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  838|   	rc = conf_get_num("nfsdcld", "debug", 0);
#  839|   	if (rc > 0)
#  840|-> 		xlog_config(D_ALL, 1);
#  841|   
#  842|   	/* process command-line options */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:847:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:843:16: branch_true: following ‘true’ branch (when ‘arg != -1’)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:845:17: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:847:25: throw: if ‘xlog_config’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:847:25: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  845|   		switch (arg) {
#  846|   		case 'd':
#  847|-> 			xlog_config(D_ALL, 1);
#  848|   			break;
#  849|   		case 'F':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:868:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progname’
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:816:20: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:817:12: branch_false: following ‘false’ branch (when ‘progname’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:822:18: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:823:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:828:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:868:9: throw: if ‘xlog_open’ throws an exception...
nfs-utils-2.8.4/utils/nfsdcld/nfsdcld.c:868:9: danger: ‘progname’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  866|   	strlcat(pipepath, DEFAULT_CLD_PATH, sizeof(pipepath));
#  867|   
#  868|-> 	xlog_open(progname);
#  869|   	if (!foreground) {
#  870|   		xlog_syslog(1);

Error: CPPCHECK_WARNING (CWE-457): [#def453]
nfs-utils-2.8.4/utils/nfsdctl/nfsdctl.c:1551: error[uninitvar]: Uninitialized variable: n->field
# 1549|   		TAILQ_FOREACH(n, &(hosts->fields), link) {
# 1550|   			if (udp)
# 1551|-> 				ret = add_listener("udp", n->field, port);
# 1552|   			if (tcp)
# 1553|   				ret = add_listener("tcp", n->field, port);

Error: CPPCHECK_WARNING (CWE-457): [#def454]
nfs-utils-2.8.4/utils/nfsdctl/nfsdctl.c:1649: error[uninitvar]: Uninitialized variable: n->field
# 1647|   			char *endptr = NULL;
# 1648|   
# 1649|-> 			threads[idx++] = strtol(n->field, &endptr, 0);
# 1650|   			if (!endptr || *endptr != '\0') {
# 1651|   				xlog(L_ERROR, "Invalid threads value %s.", n->field);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def455]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/keys", "r")’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:19: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:317:26: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:318:25: throw: if ‘xlog_warn’ throws an exception...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: danger: ‘fopen("/proc/keys", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  308|   			continue;
#  309|   
#  310|-> 		if ((keymask & mask) == 0)
#  311|   			continue;
#  312|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/keys", "r")’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:19: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:317:26: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:318:25: throw: if ‘xlog_warn’ throws an exception...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: danger: ‘fopen("/proc/keys", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  308|   			continue;
#  309|   
#  310|-> 		if ((keymask & mask) == 0)
#  311|   			continue;
#  312|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def457]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:317:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:20: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:317:26: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:317:25: danger: dereference of NULL ‘strchr(&buf, 10)’
#  315|   
#  316|   		if (verbose) {
#  317|-> 			*(strchr(buf, '\n')) = '\0';
#  318|   			xlog_warn("invalidating '%s'", buf);
#  319|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def458]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:323:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:298:15: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:299:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:28: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:303:20: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:21: branch_true: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:310:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:313:20: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:316:21: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:323:17: danger: dereference of NULL ‘strchr(&buf, 32)’
#  321|   		 * The key is the first arugment in the string
#  322|   		 */
#  323|-> 		*(strchr(buf, ' ')) = '\0';
#  324|   		sscanf(buf, "%x", &key);
#  325|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def459]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/keys", "r")’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:19: acquire_resource: opened here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: throw: if ‘xlog_err’ throws an exception...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: danger: ‘fopen("/proc/keys", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  349|   		}
#  350|   	}
#  351|-> 	xlog_err("'%s' key was not found.", keystr);
#  352|   	fclose(fp);
#  353|   	return EXIT_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/keys", "r")’
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:19: acquire_memory: allocated here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:293:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: throw: if ‘xlog_err’ throws an exception...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:351:9: danger: ‘fopen("/proc/keys", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  349|   		}
#  350|   	}
#  351|-> 	xlog_err("'%s' key was not found.", keystr);
#  352|   	fclose(fp);
#  353|   	return EXIT_FAILURE;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def461]
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:463:13: warning[-Wanalyzer-null-argument]: use of NULL ‘type’ where non-null expected
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:411:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:416:19: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:416:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:420:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:423:12: branch_false: following ‘false’ branch (when ‘display == 0’)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:425:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:425:12: branch_false: following ‘false’ branch (when ‘list == 0’)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:427:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:427:12: branch_false: following ‘false’ branch (when ‘keystr’ is NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:430:12: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:430:12: branch_false: following ‘false’ branch (when ‘clearing == 0’)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:435:9: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:436:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:442:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:450:12: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:455:13: branch_false: ...to here
nfs-utils-2.8.4/utils/nfsidmap/nfsidmap.c:463:13: danger: argument 1 (‘type’) NULL where non-null expected
#  461|   	request_key("keyring", DEFAULT_KEYRING, NULL, KEY_SPEC_THREAD_KEYRING);
#  462|   
#  463|-> 	if (strcmp(type, "uid") == 0)
#  464|   		rc = id_lookup(value, key, USER);
#  465|   	else if (strcmp(type, "gid") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
nfs-utils-2.8.4/utils/showmount/showmount.c:315:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dumpv’
nfs-utils-2.8.4/utils/showmount/showmount.c:198:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:204:9: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:264:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:269:9: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:274:27: acquire_memory: allocated here
nfs-utils-2.8.4/utils/showmount/showmount.c:275:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:281:13: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:315:9: throw: if ‘qsort’ throws an exception...
nfs-utils-2.8.4/utils/showmount/showmount.c:315:9: danger: ‘dumpv’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  313|   	}
#  314|   
#  315|-> 	qsort(dumpv, n, sizeof (char *), dump_cmp);
#  316|   	
#  317|   	for (i = 0; i < n; i++) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def463]
nfs-utils-2.8.4/utils/showmount/showmount.c:315:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dumpv’ where non-null expected
nfs-utils-2.8.4/utils/showmount/showmount.c:198:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:204:9: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:264:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:269:9: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:274:27: acquire_memory: this call could return NULL
nfs-utils-2.8.4/utils/showmount/showmount.c:275:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/showmount/showmount.c:281:13: branch_false: ...to here
nfs-utils-2.8.4/utils/showmount/showmount.c:315:9: danger: argument 1 (‘dumpv’) from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  313|   	}
#  314|   
#  315|-> 	qsort(dumpv, n, sizeof (char *), dump_cmp);
#  316|   	
#  317|   	for (i = 0; i < n; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
nfs-utils-2.8.4/utils/statd/sm-notify.c:198:9: warning[-Wanalyzer-malloc-leak]: leak of ‘retval’
nfs-utils-2.8.4/utils/statd/sm-notify.c:190:26: acquire_memory: allocated here
nfs-utils-2.8.4/utils/statd/sm-notify.c:198:9: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/statd/sm-notify.c:198:9: danger: ‘retval’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  196|   	}
#  197|   
#  198|-> 	xlog(D_GENERAL, "Canonical name for my_name '%s': %s",
#  199|   			name, retval);
#  200|   	return retval;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def465]
nfs-utils-2.8.4/utils/statd/sm-notify.c:302:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
nfs-utils-2.8.4/utils/statd/sm-notify.c:288:16: acquire_resource: datagram socket created here
nfs-utils-2.8.4/utils/statd/sm-notify.c:289:12: branch_false: following ‘false’ branch (when ‘sock != -1’)...
nfs-utils-2.8.4/utils/statd/sm-notify.c:300:17: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/sm-notify.c:302:13: throw: if ‘fcntl’ throws an exception...
nfs-utils-2.8.4/utils/statd/sm-notify.c:302:13: danger: ‘sock’ leaks here
#  300|   		nsm_family = AF_INET6;
#  301|   
#  302|-> 	if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) {
#  303|   		xlog(L_ERROR, "fcntl(3) on RPC socket failed: %m");
#  304|   		goto out_close;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def466]
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/lockd/nlm_end_grace", 1)’
nfs-utils-2.8.4/utils/statd/sm-notify.c:469:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/statd/sm-notify.c:470:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: danger: ‘open("/proc/fs/lockd/nlm_end_grace", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  476|   	}
#  477|   
#  478|-> 	if (write(fd, "Y", 1) < 0)
#  479|   		xlog(L_WARNING, "Unable to write to %s: %m", NLM_END_GRACE_FILE);
#  480|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def467]
nfs-utils-2.8.4/utils/statd/sm-notify.c:479:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/lockd/nlm_end_grace", 1)’
nfs-utils-2.8.4/utils/statd/sm-notify.c:469:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/statd/sm-notify.c:470:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/statd/sm-notify.c:479:17: branch_true: ...to here
nfs-utils-2.8.4/utils/statd/sm-notify.c:479:17: throw: if ‘xlog’ throws an exception...
nfs-utils-2.8.4/utils/statd/sm-notify.c:479:17: danger: ‘open("/proc/fs/lockd/nlm_end_grace", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  477|   
#  478|   	if (write(fd, "Y", 1) < 0)
#  479|-> 		xlog(L_WARNING, "Unable to write to %s: %m", NLM_END_GRACE_FILE);
#  480|   
#  481|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def468]
nfs-utils-2.8.4/utils/statd/sm-notify.c:481:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/fs/lockd/nlm_end_grace", 1)’
nfs-utils-2.8.4/utils/statd/sm-notify.c:469:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/statd/sm-notify.c:470:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/statd/sm-notify.c:478:13: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/sm-notify.c:481:9: danger: ‘open("/proc/fs/lockd/nlm_end_grace", 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  479|   		xlog(L_WARNING, "Unable to write to %s: %m", NLM_END_GRACE_FILE);
#  480|   
#  481|-> 	close(fd);
#  482|   	return;
#  483|   }

Error: CPPCHECK_WARNING (CWE-476): [#def469]
nfs-utils-2.8.4/utils/statd/statd.c:175: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  173|   	if (!fp)
#  174|   		xlog_err("Opening %s failed: %m\n", pidfile);
#  175|-> 	fprintf(fp, "%d\n", getpid());
#  176|   	pidfd = dup(fileno(fp));
#  177|   	if (fclose(fp) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def470]
nfs-utils-2.8.4/utils/statd/statd.c:175:9: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(pidfile, "w")’ where non-null expected
nfs-utils-2.8.4/utils/statd/statd.c:172:14: acquire_memory: allocated here
nfs-utils-2.8.4/utils/statd/statd.c:173:12: release_memory: assuming ‘fopen(pidfile, "w")’ is NULL
nfs-utils-2.8.4/utils/statd/statd.c:173:12: branch_true: following ‘true’ branch...
nfs-utils-2.8.4/utils/statd/statd.c:174:17: branch_true: ...to here
nfs-utils-2.8.4/utils/statd/statd.c:175:9: danger: argument 1 (‘fopen(pidfile, "w")’) NULL where non-null expected
#  173|   	if (!fp)
#  174|   		xlog_err("Opening %s failed: %m\n", pidfile);
#  175|-> 	fprintf(fp, "%d\n", getpid());
#  176|   	pidfd = dup(fileno(fp));
#  177|   	if (fclose(fp) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def471]
nfs-utils-2.8.4/utils/statd/statd.c:234:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/statd/statd.c:226:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/statd/statd.c:227:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/statd/statd.c:234:21: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/statd.c:234:21: throw: if ‘write’ throws an exception...
nfs-utils-2.8.4/utils/statd/statd.c:234:21: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  232|   	}
#  233|   	if (fd >= 0) {
#  234|-> 		if (write(fd, nbuf, strlen(nbuf)) != (ssize_t)strlen(nbuf))
#  235|   			fprintf(stderr, "%s: fail to set NLM %s port: %s\n",
#  236|   				name_p, type, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def472]
nfs-utils-2.8.4/utils/statd/statd.c:237:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
nfs-utils-2.8.4/utils/statd/statd.c:226:14: acquire_resource: opened here
nfs-utils-2.8.4/utils/statd/statd.c:227:12: branch_false: following ‘false’ branch...
nfs-utils-2.8.4/utils/statd/statd.c:234:21: branch_false: ...to here
nfs-utils-2.8.4/utils/statd/statd.c:237:17: throw: if ‘close’ throws an exception...
nfs-utils-2.8.4/utils/statd/statd.c:237:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  235|   			fprintf(stderr, "%s: fail to set NLM %s port: %s\n",
#  236|   				name_p, type, strerror(errno));
#  237|-> 		close(fd);
#  238|   	} else
#  239|   		fprintf(stderr, "%s: failed to open %s: %s\n", 

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-147.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-namenfs-utils-2.8.4-0.fc44
store-results-to/tmp/tmpi587sp_h/nfs-utils-2.8.4-0.fc44.tar.xz
time-created2026-01-08 19:42:10
time-finished2026-01-08 19:44:25
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpi587sp_h/nfs-utils-2.8.4-0.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpi587sp_h/nfs-utils-2.8.4-0.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9