Browse files

Fixed first-chance exception during request shutdown

  • Loading branch information...
1 parent c93396a commit 9e7ddd51ee108b436146c812c7a516ba0f6c46c0 Dmitry Stogov committed Jan 16, 2006
Showing with 8 additions and 3 deletions.
  1. +8 −3 win32/wsyslog.c
View
11 win32/wsyslog.c
@@ -62,9 +62,14 @@
void closelog(void)
{
TSRMLS_FETCH();
- DeregisterEventSource(PW32G(log_source));
- STR_FREE(PW32G(log_header));
- PW32G(log_header) = NULL;
+ if (PW32G(log_source)) {
+ DeregisterEventSource(PW32G(log_source));
+ PW32G(log_source) = NULL;
+ }
+ if (PW32G(log_header)) {
+ STR_FREE(PW32G(log_header));
+ PW32G(log_header) = NULL;
+ }
}
/* Emulator for BSD syslog() routine

0 comments on commit 9e7ddd5

Please sign in to comment.