summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/babel/packets.c2
-rw-r--r--proto/bfd/bfd.c4
-rw-r--r--proto/bfd/packets.c6
-rw-r--r--proto/bgp/bgp.c12
-rw-r--r--proto/ospf/iface.c4
-rw-r--r--proto/radv/packets.c2
-rw-r--r--proto/rip/packets.c2
-rw-r--r--proto/rip/rip.c2
-rw-r--r--proto/rpki/transport.c2
9 files changed, 18 insertions, 18 deletions
diff --git a/proto/babel/packets.c b/proto/babel/packets.c
index d26ee5c6..47d065cd 100644
--- a/proto/babel/packets.c
+++ b/proto/babel/packets.c
@@ -1680,7 +1680,7 @@ babel_open_socket(struct babel_iface *ifa)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return 0;
}
diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c
index c88c1cb2..ddbc4948 100644
--- a/proto/bfd/bfd.c
+++ b/proto/bfd/bfd.c
@@ -604,10 +604,10 @@ bfd_free_iface(struct bfd_iface *ifa)
return;
if (ifa->sk)
- rfree(ifa->sk);
+ sk_close(ifa->sk);
if (ifa->rx)
- rfree(ifa->rx);
+ sk_close(ifa->rx);
rem_node(&ifa->n);
mb_free(ifa);
diff --git a/proto/bfd/packets.c b/proto/bfd/packets.c
index a22f223b..fa8c328f 100644
--- a/proto/bfd/packets.c
+++ b/proto/bfd/packets.c
@@ -439,7 +439,7 @@ bfd_open_rx_sk(struct bfd_proto *p, int multihop, int af)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return NULL;
}
@@ -470,7 +470,7 @@ bfd_open_rx_sk_bound(struct bfd_proto *p, ip_addr local, struct iface *ifa)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return NULL;
}
@@ -501,6 +501,6 @@ bfd_open_tx_sk(struct bfd_proto *p, ip_addr local, struct iface *ifa)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return NULL;
}
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index cda0eb8d..0525d502 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -294,7 +294,7 @@ bgp_listen_create(void *_ UNUSED)
{
sk_log_error(sk, p->p.name);
log(L_ERR "%s: Cannot open listening socket", p->p.name);
- rfree(sk);
+ sk_close(sk);
UNLOCK_DOMAIN(rtable, bgp_listen_domain);
bgp_initiate_disable(p, BEM_NO_SOCKET);
@@ -335,7 +335,7 @@ bgp_listen_create(void *_ UNUSED)
WALK_LIST_DELSAFE(bs, nxt, bgp_sockets)
if (EMPTY_LIST(bs->requests))
{
- rfree(bs->sk);
+ sk_close(bs->sk);
rem_node(&bs->n);
mb_free(bs);
}
@@ -465,7 +465,7 @@ bgp_close_conn(struct bgp_conn *conn)
rfree(conn->tx_ev);
conn->tx_ev = NULL;
- rfree(conn->sk);
+ sk_close(conn->sk);
conn->sk = NULL;
mb_free(conn->local_caps);
@@ -1336,7 +1336,7 @@ bgp_incoming_connection(sock *sk, uint dummy UNUSED)
{
log(L_WARN "BGP: Unexpected connect from unknown address %I%J (port %d)",
sk->daddr, ipa_is_link_local(sk->daddr) ? sk->iface : NULL, sk->dport);
- rfree(sk);
+ sk_close(sk);
return 0;
}
@@ -1370,7 +1370,7 @@ bgp_incoming_connection(sock *sk, uint dummy UNUSED)
if (!acc)
{
- rfree(sk);
+ sk_close(sk);
goto leave;
}
@@ -1410,7 +1410,7 @@ bgp_incoming_connection(sock *sk, uint dummy UNUSED)
err:
sk_log_error(sk, p->p.name);
log(L_ERR "%s: Incoming connection aborted", p->p.name);
- rfree(sk);
+ sk_close(sk);
leave:
birdloop_leave(p->p.loop);
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 0aa7fa00..37f642d1 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -173,7 +173,7 @@ ospf_sk_open(struct ospf_iface *ifa)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return 0;
}
@@ -234,7 +234,7 @@ ospf_open_vlink_sk(struct ospf_proto *p)
err:
sk_log_error(sk, p->p.name);
log(L_ERR "%s: Cannot open virtual link socket", p->p.name);
- rfree(sk);
+ sk_close(sk);
}
static void
diff --git a/proto/radv/packets.c b/proto/radv/packets.c
index c6b565d2..d1d8663f 100644
--- a/proto/radv/packets.c
+++ b/proto/radv/packets.c
@@ -511,7 +511,7 @@ radv_sk_open(struct radv_iface *ifa)
err:
sk_log_error(sk, ifa->ra->p.name);
- rfree(sk);
+ sk_close(sk);
return 0;
}
diff --git a/proto/rip/packets.c b/proto/rip/packets.c
index fecdf896..70108ac3 100644
--- a/proto/rip/packets.c
+++ b/proto/rip/packets.c
@@ -1040,6 +1040,6 @@ rip_open_socket(struct rip_iface *ifa)
err:
sk_log_error(sk, p->p.name);
- rfree(sk);
+ sk_close(sk);
return 0;
}
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index d15177da..dded05c7 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -750,7 +750,7 @@ rip_remove_iface(struct rip_proto *p, struct rip_iface *ifa)
rem_node(NODE ifa);
- rfree(ifa->sk);
+ sk_close(ifa->sk);
rfree(ifa->lock);
rfree(ifa->timer);
diff --git a/proto/rpki/transport.c b/proto/rpki/transport.c
index 81bd6dd8..8c6dcc11 100644
--- a/proto/rpki/transport.c
+++ b/proto/rpki/transport.c
@@ -120,7 +120,7 @@ rpki_tr_close(struct rpki_tr_sock *tr)
if (tr->sk)
{
- rfree(tr->sk);
+ sk_close(tr->sk);
tr->sk = NULL;
}
}