summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorajs <ajs>2005-01-29 18:19:13 +0000
committerajs <ajs>2005-01-29 18:19:13 +0000
commit36c7fd0d065d2a7f61b546454e747f00998abf76 (patch)
treec7ca0b1e20963782b535f039c3dd0473067100b1 /bgpd/bgp_route.c
parent12634f509562dae34e02ae010603f24a22aa1361 (diff)
downloadquagga-36c7fd0d065d2a7f61b546454e747f00998abf76.tar.bz2
quagga-36c7fd0d065d2a7f61b546454e747f00998abf76.tar.xz
2005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* buffer.h: Fix comment on buffer_getstr to reflect that it now uses XMALLOC. * buffer.c: (buffer_getstr) Use XMALLOC(MTYPE_TMP) instead of malloc. * filter.c: (access_list_remark,ipv6_access_list_remark) Use argv_concat instead of buffer_getstr. * if.c: (interface_desc) Use argv_concat instead of buffer_getstr. * plist.c: (ip_prefix_list_description,ipv6_prefix_list_description) Use argv_concat instead of buffer_getstr. * bgp_filter.c: (ip_as_path,no_ip_as_path) Use argv_concat instead of buffer_getstr. * bgp_route.c: (bgp_show_regexp) Fix memory leak: need to free string returned by buffer_getstr. (bgp_show_community) Must use XFREE instead of free on string returned by buffer_getstr. * bgp_routemap.c: (set_community) Must use XFREE instead of free on string returned by buffer_getstr. * bgp_vty.c: (neighbor_description) Use argv_concat instead of buffer_getstr.
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 849cc44f..40a61b61 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6136,6 +6136,7 @@ bgp_show_regexp (struct vty *vty, int argc, const char **argv, afi_t afi,
buffer_free (b);
regex = bgp_regcomp (regstr);
+ XFREE(MTYPE_TMP, regstr);
if (! regex)
{
vty_out (vty, "Can't compile regexp %s%s", argv[0],
@@ -6712,7 +6713,7 @@ bgp_show_community (struct vty *vty, int argc, const char **argv, int exact,
buffer_free (b);
com = community_str2com (str);
- free (str);
+ XFREE (MTYPE_TMP, str);
if (! com)
{
vty_out (vty, "%% Community malformed: %s", VTY_NEWLINE);