log: shortcut return in shutdown_logging() if logging_initialized == false
authorMichael Adam <obnox@samba.org>
Sun, 10 Jan 2010 18:24:23 +0000 (19:24 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 10 Jan 2010 18:24:23 +0000 (19:24 +0100)
This does for instance happen at startup when logging has not yet been set up.

Michael

src/log.c

index b78e568c7eff7ab6812849cd2a8057757cd8ac66..39a4bac801e0bfde8a942af81ccdf013675fec0d 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -284,6 +284,10 @@ done:
  */
 void shutdown_logging (void)
 {
+       if (!logging_initialized) {
+               return;
+       }
+
         if (config.logf_name) {
                 close_log_file ();
         } else if (config.syslog) {