Skip to content

Commit

Permalink
fix recent bug in writer that closed stream, which should be left to …
Browse files Browse the repository at this point in the history
…caller (#307)
  • Loading branch information
liquidaty authored Nov 28, 2024
1 parent 54ea5dc commit 0382dff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/utils/writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ enum zsv_writer_status zsv_writer_delete(zsv_csv_writer w) {
if (w->started)
w->out.write("\n", 1, 1, w->out.stream);

/* closing the stream should be handled by whatever code first opened the stream
if (w->out.stream && w->out.stream != stdout) {
fclose(w->out.stream);
w->out.stream = NULL;
}
*/

if (w->out.buff)
free(w->out.buff);
Expand Down

0 comments on commit 0382dff

Please sign in to comment.