]> sjero.net Git - wget/blobdiff - src/log.c
Fix some problems under VMS.
[wget] / src / log.c
index 361b45370b0887062fb6f61e4e2ed2c8581c34d8..e6875f6bd722768a1391114d3dc5d6cb1d6c8454 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -573,14 +573,14 @@ log_init (const char *file, bool appendp)
     }
 }
 
-/* Close LOGFP, inhibit further logging and free the memory associated
-   with it.  */
+/* Close LOGFP (only if we opened it, not if it's stderr), inhibit
+   further logging and free the memory associated with it.  */
 void
 log_close (void)
 {
   int i;
 
-  if (logfp)
+  if (logfp && (logfp != stderr))
     fclose (logfp);
   logfp = NULL;
   inhibit_logging = true;