summaryrefslogtreecommitdiffstats
path: root/src/core/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index cb5316af3a..5631054cce 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -969,6 +969,8 @@ static void socket_close_fds(Socket *s) {
if (s->remove_on_stop)
STRV_FOREACH(i, s->symlinks)
(void) unlink(*i);
+
+ /* Note that we don't return NULL here, since s has not been freed. */
}
static void socket_apply_socket_options(Socket *s, SocketPort *p, int fd) {
@@ -1611,8 +1613,8 @@ static int socket_address_listen_in_cgroup(
DEFINE_TRIVIAL_CLEANUP_FUNC(Socket *, socket_close_fds);
-static int socket_open_fds(Socket *_s) {
- _cleanup_(socket_close_fdsp) Socket *s = _s;
+static int socket_open_fds(Socket *orig_s) {
+ _cleanup_(socket_close_fdsp) Socket *s = orig_s;
_cleanup_(mac_selinux_freep) char *label = NULL;
bool know_label = false;
SocketPort *p;