diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 93dc8c3..6bee4de 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,16 @@
+2005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* 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.
+
 2005-01-24 Hasso Tepper <hasso at quagga.net>
 
 	* bgp_route.c: Fix showstopper bug. New route must be selected also
diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c
index 09dcc0f..2f43cd0 100644
--- a/bgpd/bgp_filter.c
+++ b/bgpd/bgp_filter.c
@@ -446,10 +446,7 @@
   struct as_filter *asfilter;
   struct as_list *aslist;
   regex_t *regex;
-  struct buffer *b;
-  int i;
   char *regstr;
-  int first = 0;
 
   /* Check the filter type. */
   if (strncmp (argv[1], "p", 1) == 0)
@@ -463,25 +460,12 @@
     }
 
   /* Check AS path regex. */
-  b = buffer_new (1024);
-  for (i = 2; i < argc; i++)
-    {
-      if (first)
-	buffer_putc (b, ' ');
-      else
-	first = 1;
-
-      buffer_putstr (b, argv[i]);
-    }
-  buffer_putc (b, '\0');
-
-  regstr = buffer_getstr (b);
-  buffer_free (b);
+  regstr = argv_concat(argv, argc, 2);
 
   regex = bgp_regcomp (regstr);
   if (!regex)
     {
-      free (regstr);
+      XFREE (MTYPE_TMP, regstr);
       vty_out (vty, "can't compile regexp %s%s", argv[0],
 	       VTY_NEWLINE);
       return CMD_WARNING;
@@ -489,7 +473,7 @@
 
   asfilter = as_filter_make (regex, regstr, type);
   
-  free (regstr);
+  XFREE (MTYPE_TMP, regstr);
 
   /* Install new filter to the access_list. */
   aslist = as_list_get (argv[0]);
@@ -518,9 +502,6 @@
   enum as_filter_type type;
   struct as_filter *asfilter;
   struct as_list *aslist;
-  struct buffer *b;
-  int i;
-  int first = 0;
   char *regstr;
   regex_t *regex;
 
@@ -545,25 +526,12 @@
     }
   
   /* Compile AS path. */
-  b = buffer_new (1024);
-  for (i = 2; i < argc; i++)
-    {
-      if (first)
-	buffer_putc (b, ' ');
-      else
-	first = 1;
-
-      buffer_putstr (b, argv[i]);
-    }
-  buffer_putc (b, '\0');
-
-  regstr = buffer_getstr (b);
-  buffer_free (b);
+  regstr = argv_concat(argv, argc, 2);
 
   regex = bgp_regcomp (regstr);
   if (!regex)
     {
-      free (regstr);
+      XFREE (MTYPE_TMP, regstr);
       vty_out (vty, "can't compile regexp %s%s", argv[0],
 	       VTY_NEWLINE);
       return CMD_WARNING;
@@ -572,7 +540,7 @@
   /* Lookup asfilter. */
   asfilter = as_filter_lookup (aslist, regstr, type);
 
-  free (regstr);
+  XFREE (MTYPE_TMP, regstr);
   bgp_regex_free (regex);
 
   if (asfilter == NULL)
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 849cc44..40a61b6 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6136,6 +6136,7 @@
   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 @@
   buffer_free (b);
 
   com = community_str2com (str);
-  free (str);
+  XFREE (MTYPE_TMP, str);
   if (! com)
     {
       vty_out (vty, "%% Community malformed: %s", VTY_NEWLINE);
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index e2ad5e0..7674005 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2846,7 +2846,7 @@
   if (str)
     {
       com = community_str2com (str);
-      free (str);
+      XFREE (MTYPE_TMP, str);
     }
 
   /* Can't compile user input into communities attribute.  */
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 027b8ca..5968f68 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -28,6 +28,7 @@
 #include "stream.h"
 #include "thread.h"
 #include "log.h"
+#include "memory.h"
 
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_attr.h"
@@ -2576,9 +2577,7 @@
        "Up to 80 characters describing this neighbor\n")
 {
   struct peer *peer;
-  struct buffer *b;
   char *str;
-  int i;
 
   peer = peer_and_group_lookup_vty (vty, argv[0]);
   if (! peer)
@@ -2587,21 +2586,11 @@
   if (argc == 1)
     return CMD_SUCCESS;
 
-  /* Make string from buffer.  This function should be provided by
-     buffer.c. */
-  b = buffer_new (1024);
-  for (i = 1; i < argc; i++)
-    {
-      buffer_putstr (b, argv[i]);
-      buffer_putc (b, ' ');
-    }
-  buffer_putc (b, '\0');
-  str = buffer_getstr (b);
-  buffer_free (b);
+  str = argv_concat(argv, argc, 1);
 
   peer_description_set (peer, str);
 
-  free (str);
+  XFREE (MTYPE_TMP, str);
 
   return CMD_SUCCESS;
 }
