From b5f4d75d1105dc9db66ee09164c3e03bedc9ebe7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 24 Sep 2003 20:56:42 +0000 Subject: [PATCH] (freebuffer): Don't free the argument, just the buffer associated with the argument. Bug reported by Simon Josefsson. --- lib/linebuffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/linebuffer.c b/lib/linebuffer.c index 434d6d8588..bed5d94fb8 100644 --- a/lib/linebuffer.c +++ b/lib/linebuffer.c @@ -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); } -- 2.30.2