(cut_fields): Free buffer upon getndelim2 failure.

This commit is contained in:
Jim Meyering committed 2004-04-20 06:50:37 +00:00
1 parent 58e94308f5
commit ffccc03ad8
1 file changed
+1
+1
View File
@@ -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 ();