mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
activate: fix fd leak in do_accept()
Found with Coverity.
This commit is contained in:
committed by
David Herrmann
parent
3f2e132a19
commit
aa44499da1
@@ -242,7 +242,7 @@ static int launch1(const char* child, char** argv, char **env, int fd) {
|
||||
|
||||
static int do_accept(const char* name, char **argv, char **envp, int fd) {
|
||||
_cleanup_free_ char *local = NULL, *peer = NULL;
|
||||
int fd2;
|
||||
_cleanup_close_ int fd2 = -1;
|
||||
|
||||
fd2 = accept(fd, NULL, NULL);
|
||||
if (fd2 < 0) {
|
||||
|
||||
Reference in New Issue
Block a user