summaryrefslogtreecommitdiffstats
path: root/sysdep/bsd
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-08-15 02:06:56 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-08-15 02:06:56 +0200
commita209d5d8e1bea2b37a7cddebe1f275da4ebde4e3 (patch)
tree6db52e2902afbc19f29eeccf2cf1e8ce9bff97cb /sysdep/bsd
parent8815d846bf77e4231f36b64d8e4ac9a3ec2d1504 (diff)
downloadbird-a209d5d8e1bea2b37a7cddebe1f275da4ebde4e3.tar
bird-a209d5d8e1bea2b37a7cddebe1f275da4ebde4e3.zip
A minor fix in BSD.
Diffstat (limited to 'sysdep/bsd')
-rw-r--r--sysdep/bsd/krt-sock.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 9e3dcfe..f6bc4a2 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -697,8 +697,10 @@ krt_set_construct(struct krt_config *c UNUSED)
void
krt_set_shutdown(struct krt_proto *x UNUSED, int last UNUSED)
{
- if (krt_buffer)
- mb_free(krt_buffer);
+ if (!krt_buffer)
+ return;
+
+ mb_free(krt_buffer);
krt_buffer = NULL;
}
@@ -720,6 +722,9 @@ krt_if_start(struct kif_proto *p UNUSED)
void
krt_if_shutdown(struct kif_proto *p UNUSED)
{
+ if (!kif_buffer)
+ return;
+
mb_free(kif_buffer);
kif_buffer = NULL;
}