summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-04-20 21:06:42 +0200
committerMaria Matejka <mq@ucw.cz>2023-04-22 20:48:42 +0200
commitb3f805ce29487f790090fcf31096f5a7cf1d585d (patch)
tree5391762ee46af090a2ca5bb0d5674c66a8aab04e /sysdep
parent074739e0e9baaba53f2a99edd348b76c3613b455 (diff)
Socket closing has its dedicated function
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/bsd/krt-sock.c4
-rw-r--r--sysdep/unix/io.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 094268b7..6bf756ff 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -1118,7 +1118,7 @@ krt_sock_close_shared(void)
if (!krt_sock_count)
{
- rfree(krt_sock);
+ sk_close(krt_sock);
krt_sock = NULL;
}
}
@@ -1181,7 +1181,7 @@ krt_sys_shutdown(struct krt_proto *p)
{
krt_table_cf[(KRT_CF->sys.table_id)/32][!!(p->af == AF_INET6)] &= ~(1 << ((KRT_CF->sys.table_id)%32));
- rfree(p->sys.sk);
+ sk_close(p->sys.sk);
p->sys.sk = NULL;
krt_buffer_release(&p->p);
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 88d187a4..40a6f114 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1081,7 +1081,7 @@ sk_passive_connected(sock *s, int type)
/* FIXME: handle it better in rfree() */
close(t->fd);
t->fd = -1;
- rfree(t);
+ sk_close(t);
return 1;
}