From: Ilia Alshanetsky Date: Wed, 20 Feb 2008 15:27:47 +0000 (+0000) Subject: MFB: Fixed a possible crash with syslog logging on ZTS builds X-Git-Tag: RELEASE_2_0_0a1~413 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2339c30a61681cd5c24a15dd502ffe5cc3c15d71;p=php MFB: Fixed a possible crash with syslog logging on ZTS builds --- diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 81b7430a2a..090fb4db7e 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -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; }