mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
ctl_handler_init: fixed resource leaks
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -147,6 +147,7 @@ int ctl_handler_init(main_server_st * s)
|
||||
e = errno;
|
||||
mslog(s, NULL, LOG_ERR, "could not bind socket '%s': %s",
|
||||
GETPCONFIG(s)->occtl_socket_file, strerror(e));
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -162,6 +163,7 @@ int ctl_handler_init(main_server_st * s)
|
||||
e = errno;
|
||||
mslog(s, NULL, LOG_ERR, "could not listen to socket '%s': %s",
|
||||
GETPCONFIG(s)->occtl_socket_file, strerror(e));
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user