Skip to content

Commit 42ea0ca

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
2 parents 9717e9f + c6eeb83 commit 42ea0ca

File tree

4 files changed

+4
-28
lines changed

4 files changed

+4
-28
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.3.0
44

5+
- Standard:
6+
. Fix memory leak in syslog device handling. (danog)
57

68
09 Nov 2023, PHP 8.3.0RC6
79

ext/standard/basic_functions.c

+1-9
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,6 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
358358

359359
PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
360360
{
361-
#ifdef HAVE_SYSLOG_H
362-
PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
363-
#endif
364361
#ifdef ZTS
365362
ts_free_id(basic_globals_id);
366363
#ifdef PHP_WIN32
@@ -417,9 +414,6 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
417414
BG(user_shutdown_function_names) = NULL;
418415

419416
PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
420-
#ifdef HAVE_SYSLOG_H
421-
BASIC_RINIT_SUBMODULE(syslog)
422-
#endif
423417
BASIC_RINIT_SUBMODULE(dir)
424418
BASIC_RINIT_SUBMODULE(url_scanner_ex)
425419

@@ -469,9 +463,7 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
469463

470464
PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
471465
#ifdef HAVE_SYSLOG_H
472-
#ifdef PHP_WIN32
473-
BASIC_RSHUTDOWN_SUBMODULE(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
474-
#endif
466+
BASIC_RSHUTDOWN_SUBMODULE(syslog);
475467
#endif
476468
BASIC_RSHUTDOWN_SUBMODULE(assert)
477469
BASIC_RSHUTDOWN_SUBMODULE(url_scanner_ex)

ext/standard/php_ext_syslog.h

-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
#include "php_syslog.h"
2323

2424
PHP_MINIT_FUNCTION(syslog);
25-
PHP_RINIT_FUNCTION(syslog);
26-
#ifdef PHP_WIN32
2725
PHP_RSHUTDOWN_FUNCTION(syslog);
28-
#endif
29-
PHP_MSHUTDOWN_FUNCTION(syslog);
3026

3127
#endif
3228

ext/standard/syslog.c

+1-15
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,9 @@ PHP_MINIT_FUNCTION(syslog)
4141
}
4242
/* }}} */
4343

44-
PHP_RINIT_FUNCTION(syslog)
45-
{
46-
BG(syslog_device) = NULL;
47-
return SUCCESS;
48-
}
49-
50-
51-
#ifdef PHP_WIN32
5244
PHP_RSHUTDOWN_FUNCTION(syslog)
5345
{
54-
closelog();
55-
return SUCCESS;
56-
}
57-
#endif
58-
59-
PHP_MSHUTDOWN_FUNCTION(syslog)
60-
{
46+
php_closelog();
6147
if (BG(syslog_device)) {
6248
free(BG(syslog_device));
6349
BG(syslog_device) = NULL;

0 commit comments

Comments
 (0)