From: Paul Eggert Date: Wed, 24 Sep 2003 20:56:42 +0000 (+0000) Subject: (freebuffer): Don't free the argument, just the buffer associated with X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5f4d75d1105dc9db66ee09164c3e03bedc9ebe7;p=pspp (freebuffer): Don't free the argument, just the buffer associated with the argument. Bug reported by Simon Josefsson. --- 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); }