changeset 4727:9c493e421b7f

(freebuffer): Don't free the argument, just the buffer associated with the argument. Bug reported by Simon Josefsson.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 24 Sep 2003 20:56:42 +0000
parents f6c445bbf87c
children 441e2be5f104
files lib/linebuffer.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/linebuffer.c
+++ b/lib/linebuffer.c
@@ -87,11 +87,10 @@
   return linebuffer;
 }
 
-/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
+/* Free the buffer that was allocated for linebuffer LINEBUFFER.  */
 
 void
 freebuffer (struct linebuffer *linebuffer)
 {
   free (linebuffer->buffer);
-  free (linebuffer);
 }