Permalink
Browse files

Fixed first-chance exception during request shutdown

  • Loading branch information...
1 parent b8360c3 commit bc410c3863eb4aba783ec2bfd1ccbc723589cf9c Dmitry Stogov committed Jan 16, 2006
Showing with 8 additions and 3 deletions.
  1. +8 −3 win32/wsyslog.c
View
@@ -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 bc410c3

Please sign in to comment.