Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
This commit is contained in:
Christoph M. Becker 2021-03-15 18:39:11 +01:00
commit eae69fcf71
2 changed files with 5 additions and 2 deletions

3
NEWS
View file

@ -9,6 +9,9 @@ PHP NEWS
. Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space
available for static Thread Local Storage). (Dmitry)
- Dba:
. Fixed bug #80817 (dba_popen() may cause segfault during RSHUTDOWN). (cmb)
- IMAP:
. Fixed bug #80800 (imap_open() fails when the flags parameter includes
CL_EXPUNGE). (girgias)

View file

@ -863,9 +863,9 @@ restart:
zend_bool close_both;
close_both = (info->fp != info->lock.fp);
php_stream_close(info->lock.fp);
php_stream_free(info->lock.fp, persistent ? PHP_STREAM_FREE_CLOSE_PERSISTENT : PHP_STREAM_FREE_CLOSE);
if (close_both) {
php_stream_close(info->fp);
php_stream_free(info->fp, persistent ? PHP_STREAM_FREE_CLOSE_PERSISTENT : PHP_STREAM_FREE_CLOSE);
}
info->fp = NULL;
info->lock.fp = NULL;