diff --git a/lib/command.c b/lib/command.c
index 37767e9..73a8a80 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2364,7 +2364,7 @@
 
 /* Command line completion support. */
 static char **
-cmd_complete_command_real (vector vline, struct vty *vty, int *status)
+cmd_complete_command_real (vector vline, struct vty *vty, int *status, int islib)
 {
   unsigned int i;
   vector cmd_vector = vector_copy (cmd_node_vector (cmdvec, vty->node));
@@ -2449,13 +2449,13 @@
 
 	for (j = 0; j < vector_active (match_vector); j++)
 	  if ((token = vector_slot (match_vector, j)))
-		{
-		  if ((string = 
-		       cmd_entry_function (vector_slot (vline, index),
-					   token)))
-		    if (cmd_unique_string (matchvec, string))
-		      vector_set (matchvec, XSTRDUP (MTYPE_TMP, string));
-		}
+            {
+              string = cmd_entry_function (vector_slot (vline, index), token);
+              if (string && cmd_unique_string (matchvec, string))
+                vector_set (matchvec, (islib != 0 ?
+                                      XSTRDUP (MTYPE_TMP, string) :
+                                      strdup (string) /* rl freed */));
+            }
       }
 
   /* We don't need cmd_vector any more. */
@@ -2500,7 +2500,9 @@
 	    {
 	      char *lcdstr;
 
-	      lcdstr = XMALLOC (MTYPE_TMP, lcd + 1);
+	      lcdstr = (islib != 0 ?
+                        XMALLOC (MTYPE_TMP, lcd + 1) :
+                        malloc(lcd + 1));
 	      memcpy (lcdstr, matchvec->index[0], lcd);
 	      lcdstr[lcd] = '\0';
 
@@ -2508,10 +2510,15 @@
 
 	      /* Free matchvec. */
 	      for (i = 0; i < vector_active (matchvec); i++)
-		{
-		  if (vector_slot (matchvec, i))
-		    XFREE (MTYPE_TMP, vector_slot (matchvec, i));
-		}
+                {
+                  if (vector_slot (matchvec, i))
+                    {
+                      if (islib != 0)
+                        XFREE (MTYPE_TMP, vector_slot (matchvec, i));
+                      else
+                        free (vector_slot (matchvec, i));
+                    }
+                }
 	      vector_free (matchvec);
 
 	      /* Make new matchvec. */
@@ -2534,7 +2541,7 @@
 }
 
 char **
-cmd_complete_command (vector vline, struct vty *vty, int *status)
+cmd_complete_command_lib (vector vline, struct vty *vty, int *status, int islib)
 {
   char **ret;
 
@@ -2555,15 +2562,20 @@
 	  vector_set_index (shifted_vline, index-1, vector_lookup(vline, index));
 	}
 
-      ret = cmd_complete_command_real (shifted_vline, vty, status);
+      ret = cmd_complete_command_real (shifted_vline, vty, status, islib);
 
       vector_free(shifted_vline);
       vty->node = onode;
       return ret;
   }
 
+  return cmd_complete_command_real (vline, vty, status, islib);
+}
 
-  return cmd_complete_command_real (vline, vty, status);
+char **
+cmd_complete_command (vector vline, struct vty *vty, int *status)
+{
+  return cmd_complete_command_lib (vline, vty, status, 0);
 }
 
 /* return parent node */
diff --git a/lib/command.h b/lib/command.h
index 6030069..afc2e3f 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -526,6 +526,7 @@
 extern void cmd_free_strvec (vector);
 extern vector cmd_describe_command (vector, struct vty *, int *status);
 extern char **cmd_complete_command (vector, struct vty *, int *status);
+extern char **cmd_complete_command_lib (vector, struct vty *, int *status, int islib);
 extern const char *cmd_prompt (enum node_type);
 extern int command_config_read_one_line (struct vty *vty, struct cmd_element **, int use_config_node);
 extern int config_from_file (struct vty *, FILE *, unsigned int *line_num);
diff --git a/lib/vty.c b/lib/vty.c
index 8befcb0..480d34f 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -873,7 +873,7 @@
   if (isspace ((int) vty->buf[vty->length - 1]))
     vector_set (vline, NULL);
 
-  matched = cmd_complete_command (vline, vty, &ret);
+  matched = cmd_complete_command_lib (vline, vty, &ret, 1);
   
   cmd_free_strvec (vline);
 
