From ffccc03ad87b5082dd0bb63616777b830b71a423 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 20 Apr 2004 06:50:37 +0000 Subject: (cut_fields): Free buffer upon getndelim2 failure. --- src/cut.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/cut.c b/src/cut.c index 83fd4efc4..e060bbd21 100644 --- a/src/cut.c +++ b/src/cut.c @@ -584,6 +584,7 @@ cut_fields (FILE *stream) stream, delim, '\n', 0); if (len < 0) { + free (field_1_buffer); if (ferror (stream) || feof (stream)) break; xalloc_die (); -- cgit v1.2.3-70-g09d2