From: Ben Pfaff Date: Mon, 4 Jul 2005 05:49:51 +0000 (+0000) Subject: [HAVE_LIBREADLINE] (read_console) Fix memory leak on `line'. X-Git-Tag: v0.4.0~47 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d8b95f32122982e75376370628ae82b994c2e4;p=pspp-builds.git [HAVE_LIBREADLINE] (read_console) Fix memory leak on `line'. --- diff --git a/src/getline.c b/src/getline.c index 3c58edcc..d0170980 100644 --- a/src/getline.c +++ b/src/getline.c @@ -478,6 +478,8 @@ read_console (void) ds_clear (&getl_buf); ds_puts (&getl_buf, line); + free (line); + return 1; } #else /* no -lreadline */