common: logstream fix.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 20 Jul 2017 07:37:56 +0000 (16:37 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 20 Jul 2017 07:37:56 +0000 (16:37 +0900)
* common/logging.c (set_file_fd): Don't close es_stderr.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
common/logging.c

index bc5f72b..c4eaca4 100644 (file)
@@ -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;
     }