summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-06-24 10:04:06 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-06-24 10:04:06 +0000
commit8acfbd90dd62985c5bf07a86b2557108225b856a (patch)
tree3ade98247418014aaf1b27ea722a4b27633e3506 /usr.sbin/bgpd/rde_attr.c
parent26870a50c51a498f7481de6354b6e925f5187a31 (diff)
aspath_deflate() did free the passed in data but since the way aspaths
are processed in the Adj-RIB-Out this is no longer needed since the passed in pointer is still referenced and is not allowed to be freed. Adjust the mrt code similar to how up_generate_attr() uses aspath_deflate(). OK sthen@
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 69d8ee0da1f..2402aae4903 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.124 2021/01/16 13:14:54 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.125 2021/06/24 10:04:05 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -568,7 +568,6 @@ aspath_put(struct aspath *aspath)
/*
* convert a 4 byte aspath to a 2 byte one.
- * data is freed by aspath_deflate
*/
u_char *
aspath_deflate(u_char *data, u_int16_t *len, int *flagnew)
@@ -614,7 +613,6 @@ aspath_deflate(u_char *data, u_int16_t *len, int *flagnew)
}
}
- free(data);
*len = nlen;
return (ndata);
}