From: Ondrej Zajicek Date: Mon, 15 Aug 2011 00:06:56 +0000 (+0200) Subject: A minor fix in BSD. X-Git-Tag: v1.3.3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a209d5d8e1bea2b37a7cddebe1f275da4ebde4e3;p=thirdparty%2Fbird.git A minor fix in BSD. --- diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 9e3dcfeae..f6bc4a2ca 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; }