diff options
Diffstat (limited to 'sysdep')
-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; } |