diff options
Diffstat (limited to 'ext/standard/syslog.c')
-rw-r--r-- | ext/standard/syslog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 2abef47859..cc49cc5f4a 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -146,6 +146,9 @@ PHP_FUNCTION(openlog) free(BG(syslog_device)); } BG(syslog_device) = zend_strndup(ident, ident_len); + if(BG(syslog_device) == NULL) { + RETURN_FALSE; + } openlog(BG(syslog_device), option, facility); RETURN_TRUE; } |