]> granicus.if.org Git - php/commitdiff
MFB: Fixed a possible crash with syslog logging on ZTS builds
authorIlia Alshanetsky <iliaa@php.net>
Wed, 20 Feb 2008 15:27:47 +0000 (15:27 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 20 Feb 2008 15:27:47 +0000 (15:27 +0000)
ext/standard/syslog.c

index 81b7430a2a217a0fbec2149c213ec3be95a3a9a5..090fb4db7eb430e9c27aeff7d46fbd7f5dca1507 100644 (file)
@@ -110,6 +110,7 @@ PHP_RINIT_FUNCTION(syslog) /* {{{ */
        } else {
                BG(syslog_started)=0;
        }
+       BG(syslog_device) = NULL;
        return SUCCESS;
 }
 /* }}} */
@@ -127,6 +128,7 @@ PHP_MSHUTDOWN_FUNCTION(syslog) /* {{{ */
 {
        if (BG(syslog_device)) {
                free(BG(syslog_device));
+               BG(syslog_device) = NULL;
        }
        return SUCCESS;
 }