[HAVE_LIBREADLINE] (read_console) Fix memory leak on `line'.
authorBen Pfaff <blp@gnu.org>
Mon, 4 Jul 2005 05:49:51 +0000 (05:49 +0000)
committerBen Pfaff <blp@gnu.org>
Mon, 4 Jul 2005 05:49:51 +0000 (05:49 +0000)
src/getline.c

index 3c58edcc31610606e741a313a9e72eb69569f2c9..d0170980096160a65d7f26b756f5018cafc883e0 100644 (file)
@@ -478,6 +478,8 @@ read_console (void)
   ds_clear (&getl_buf);
   ds_puts (&getl_buf, line);
 
+  free (line);
+
   return 1;
 }
 #else /* no -lreadline */