Task #135775 - fixed.err

back to task #135775
download
Error: GCC_ANALYZER_WARNING (CWE-775):
conmon-2.2.1/src/conn_sock.c:215:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*fd’
conmon-2.2.1/src/conn_sock.c: scope_hint: In function ‘setup_socket’
#  213|   		pexit("Failed to create socket");
#  214|   	bind_relative_to_dir(sfd, *fd, bname);
#  215|-> 	if (listen(*fd, 128) < 0)
#  216|   		pexit("Failed to listen on console-socket");
#  217|   

Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.2.1/src/conn_sock.c:6: included_from: Included from here.
conmon-2.2.1/src/conn_sock.c: scope_hint: In function ‘setup_socket’
conmon-2.2.1/src/utils.h:68:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(path)’
conmon-2.2.1/src/conn_sock.c:177:25: note: in expansion of macro ‘pexit’
/usr/include/glib-2.0/glib/gtestutils.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib.h:89: included_from: Included from here.
conmon-2.2.1/src/conn_sock.h:4: included_from: Included from here.
conmon-2.2.1/src/conn_sock.c:3: included_from: Included from here.
conmon-2.2.1/src/conn_sock.c:177:25: note: in expansion of macro ‘pexit’
conmon-2.2.1/src/conn_sock.c:177:25: note: in expansion of macro ‘pexit’
#   66|   		int saved_errno = errno; \
#   67|   		errno = saved_errno; \
#   68|-> 		fprintf(stderr, "[conmon:e]: %s %m\n", s); \
#   69|   		if (use_syslog) { \
#   70|   			errno = saved_errno; \

Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.2.1/src/utils.h:80:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(path)’
conmon-2.2.1/src/conn_sock.c:182:25: note: in expansion of macro ‘pexitf’
conmon-2.2.1/src/conn_sock.c:182:25: note: in expansion of macro ‘pexitf’
conmon-2.2.1/src/conn_sock.c:182:25: note: in expansion of macro ‘pexitf’
#   78|   		int saved_errno = errno; \
#   79|   		errno = saved_errno; \
#   80|-> 		fprintf(stderr, "[conmon:e]: " fmt " %m\n", ##__VA_ARGS__); \
#   81|   		if (use_syslog) { \
#   82|   			errno = saved_errno; \