diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2011-08-15 02:06:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2011-08-15 02:06:56 +0200 |
commit | a209d5d8e1bea2b37a7cddebe1f275da4ebde4e3 (patch) | |
tree | 6db52e2902afbc19f29eeccf2cf1e8ce9bff97cb | |
parent | 8815d846bf77e4231f36b64d8e4ac9a3ec2d1504 (diff) |
A minor fix in BSD.
-rw-r--r-- | sysdep/bsd/krt-sock.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 9e3dcfea..f6bc4a2c 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; } |