summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/bgpd.c6
-rw-r--r--usr.sbin/bgpd/imsg.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index a046d330d3a..fb2cbd6ea79 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.46 2003/12/30 20:59:43 henning Exp $ */
+/* $OpenBSD: bgpd.c,v 1.47 2003/12/30 22:42:31 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -359,11 +359,11 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct mrt_config *conf)
if (wbuf == NULL)
return (-1);
if (buf_add(wbuf, imsg.data, len) == -1) {
- free(wbuf);
+ buf_free(wbuf);
return (-1);
}
if ((n = buf_close(&m->msgbuf, wbuf)) < 0) {
- free(wbuf);
+ buf_free(wbuf);
return (-1);
}
break;
diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c
index 2214fb7e2d1..ed80e399c45 100644
--- a/usr.sbin/bgpd/imsg.c
+++ b/usr.sbin/bgpd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.13 2003/12/30 20:59:43 henning Exp $ */
+/* $OpenBSD: imsg.c,v 1.14 2003/12/30 22:42:31 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -101,19 +101,19 @@ imsg_compose(struct imsgbuf *ibuf, int type, u_int32_t peerid, void *data,
}
if (buf_add(wbuf, &hdr, sizeof(hdr)) == -1) {
logit(LOG_CRIT, "imsg_compose: buf_add error");
- free(wbuf);
+ buf_free(wbuf);
return (-1);
}
if (datalen)
if (buf_add(wbuf, data, datalen) == -1) {
logit(LOG_CRIT, "imsg_compose: buf_add error");
- free(wbuf);
+ buf_free(wbuf);
return (-1);
}
if ((n = buf_close(&ibuf->w, wbuf)) < 0) {
logit(LOG_CRIT, "imsg_compose: buf_add error");
- free(wbuf);
+ buf_free(wbuf);
return (-1);
}
return (n);