(freebuffer): Don't free the argument, just the buffer associated with
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Sep 2003 20:56:42 +0000 (20:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Sep 2003 20:56:42 +0000 (20:56 +0000)
the argument.  Bug reported by Simon Josefsson.

lib/linebuffer.c

index 434d6d8588638a921e4f5acf8fea1272065b388b..bed5d94fb889b8fd7716a4ed794558243a87b4b8 100644 (file)
@@ -87,11 +87,10 @@ readlinebuffer (struct linebuffer *linebuffer, FILE *stream)
   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);
 }