]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
A minor fix in BSD.
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 15 Aug 2011 00:06:56 +0000 (02:06 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 15 Aug 2011 00:06:56 +0000 (02:06 +0200)
sysdep/bsd/krt-sock.c

index 9e3dcfeaee15036c38be092305213e3b9fe039bd..f6bc4a2caf3eb1f4f87dc329ceb907ff587d322d 100644 (file)
@@ -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;
 }