diff --git a/common/logging.c b/common/logging.c index bc5f72b35..c4eaca411 100644 --- a/common/logging.c +++ b/common/logging.c @@ -472,7 +472,8 @@ set_file_fd (const char *name, int fd) /* Close an open log stream. */ if (logstream) { - es_fclose (logstream); + if (logstream != es_stderr) + es_fclose (logstream); logstream = NULL; }