Error: GCC_ANALYZER_WARNING (CWE-1341):
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c:4: included_from: Included from here.
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c: scope_hint: In function ‘cleanup_closep.part.0’
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c:51:25: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*(void *)p’
#   49|     int *pp = p;
#   50|     if (*pp >= 0)
#   51|->     TEMP_FAILURE_RETRY (close (*pp));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c:51:25: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c: scope_hint: In function ‘cleanup_closep.part.0’
#   49|     int *pp = p;
#   50|     if (*pp >= 0)
#   51|->     TEMP_FAILURE_RETRY (close (*pp));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-775):
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c: scope_hint: In function ‘get_cmd_line_args’
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c:308:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/self/cmdline", 0)’
#  306|     char **argv;
#  307|   
#  308|->   fd = open ("/proc/self/cmdline", O_RDONLY);
#  309|     if (fd < 0)
#  310|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c: scope_hint: In function ‘init’
podman-5.3.0_dev-build/podman-5.3.0-dev/pkg/rootless/rootless_linux.c:453:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/self/fd")’
#  451|   
#  452|     /* Store how many FDs were open before the Go runtime kicked in.  */
#  453|->   d = opendir ("/proc/self/fd");
#  454|     if (d)
#  455|       {

Error: GCC_ANALYZER_WARNING (CWE-775):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:118:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’
#  116|   		new_size = used + BUFSTEP;
#  117|   		new_buf = realloc(buf, new_size);
#  118|-> 		if (new_buf == NULL) {
#  119|   			free(buf);
#  120|   			fprintf(stderr, "realloc(%ld): out of memory\n", (long)(size + BUFSTEP));

Error: GCC_ANALYZER_WARNING (CWE-775):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:125:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’
#  123|   		buf = new_buf;
#  124|   		size = new_size;
#  125|-> 		memset(buf + used, '\0', size - used);
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:125:28: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’
#  123|   		buf = new_buf;
#  124|   		size = new_size;
#  125|-> 		memset(buf + used, '\0', size - used);
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {
#  128|-> 			fprintf(stderr, "read(): %m\n");
#  129|   			return NULL;
#  130|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {
#  128|-> 			fprintf(stderr, "read(): %m\n");
#  129|   			return NULL;
#  130|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:154:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
#  152|   		}
#  153|   	}
#  154|-> 	ret[i] = NULL;
#  155|   	return ret;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:154:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
#  152|   		}
#  153|   	}
#  154|-> 	ret[i] = NULL;
#  155|   	return ret;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:291:12: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/containers/storage/pkg/unshare/unshare.c:18: included_from: Included from here.
#  289|   		return fd;
#  290|   
#  291|-> 	if (fexecve(fd, argv, environ) == -1) {
#  292|   		close(fd);
#  293|   		fprintf(stderr, "Error during reexec(...): %m\n");

Error: COMPILER_WARNING (CWE-1164):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/mattn/go-sqlite3/sqlite3.go:85:1: warning[-Wunused-function]: ‘_sqlite3_exec’ defined but not used
#   85 | _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes)
#      | ^~~~~~~~~~~~~
#   83|   
#   84|   static int
#   85|-> _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes)
#   86|   {
#   87|     int rv = sqlite3_exec(db, pcmd, 0, 0, 0);

Error: GCC_ANALYZER_WARNING (CWE-476):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New'
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'c'
#   75|   	CK_C_GetFunctionList list;
#   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
#   77|-> 	c->handle = dlopen(module, RTLD_LAZY);
#   78|   	if (c->handle == NULL) {
#   79|   		free(c);

Error: GCC_ANALYZER_WARNING (CWE-476):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘c’
#   75|   	CK_C_GetFunctionList list;
#   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
#   77|-> 	c->handle = dlopen(module, RTLD_LAZY);
#   78|   	if (c->handle == NULL) {
#   79|   		free(c);

Error: GCC_ANALYZER_WARNING (CWE-401):
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’
podman-5.3.0_dev-build/podman-5.3.0-dev/vendor/github.com/miekg/pkcs11/pkcs11.go:316:32: warning[-Wanalyzer-malloc-leak]: leak of ‘*((CK_ATTRIBUTE *)temp).pValue’
#  314|   			continue;
#  315|   		}
#  316|-> 		temp[i].pValue = calloc(temp[i].ulValueLen, sizeof(CK_BYTE));
#  317|   	}
#  318|   	return c->sym->C_GetAttributeValue(session, object, temp, templen);
