summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-05 05:51:53 +0000
committerJim Meyering <jim@meyering.net>1995-11-05 05:51:53 +0000
commit2224409994a09fadf356a66367ce285f4f03e9f0 (patch)
treef74803f81ee7ef8162e085825328ac407046aa0c
parent30d11429a98facc2d11db0631fac0bb7264e217b (diff)
downloadcoreutils-2224409994a09fadf356a66367ce285f4f03e9f0.tar.xz
(close_output_file): Set output_stream to NULL so we don't recurse
endlessly between this function and cleanup.
-rw-r--r--src/csplit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/csplit.c b/src/csplit.c
index a81144a66..f40a102b2 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -1037,6 +1037,7 @@ close_output_file ()
if (fclose (output_stream) == EOF)
{
error (0, errno, _("write error for `%s'"), output_filename);
+ output_stream = NULL;
cleanup ();
}
if (bytes_written == 0 && elide_empty_files)