summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/mrt.c
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2015-12-30 12:06:57 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2015-12-30 12:06:57 +0000
commit19c7ff974f700039dc10da11f3efc5bd1b6cd664 (patch)
tree8829c5707e9d67fa7e40b7be504dc49c32bfd340 /usr.sbin/bgpd/mrt.c
parentbc726ba25cdd8390a9f76fd7407d5b02902b8354 (diff)
now that ibuf_free() checks for null, we can remove the check here.
ok mmcc@ millert@ tb@ claudio@
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r--usr.sbin/bgpd/mrt.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index d66a69f88e8..5021db09607 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.80 2015/12/05 18:28:04 benno Exp $ */
+/* $OpenBSD: mrt.c,v 1.81 2015/12/30 12:06:56 benno Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -355,10 +355,8 @@ mrt_dump_entry_mp(struct mrt *mrt, struct prefix *p, u_int16_t snum,
return (len + MRT_HEADER_SIZE);
fail:
- if (hbuf)
- ibuf_free(hbuf);
- if (h2buf)
- ibuf_free(h2buf);
+ ibuf_free(hbuf);
+ ibuf_free(h2buf);
ibuf_free(buf);
return (-1);
}
@@ -540,8 +538,7 @@ mrt_dump_entry_v2(struct mrt *mrt, struct rib_entry *re, u_int32_t snum)
return (0);
fail:
- if (hbuf)
- ibuf_free(hbuf);
+ ibuf_free(hbuf);
ibuf_free(buf);
return (-1);
}
@@ -595,8 +592,7 @@ mrt_dump_v2_hdr(struct mrt *mrt, struct bgpd_config *conf,
return (0);
fail:
- if (hbuf)
- ibuf_free(hbuf);
+ ibuf_free(hbuf);
ibuf_free(buf);
return (-1);
}