Skip to content

Commit eae69fc

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
2 parents 50254de + f448b0e commit eae69fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ PHP NEWS
99
. Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space
1010
available for static Thread Local Storage). (Dmitry)
1111

12+
- Dba:
13+
. Fixed bug #80817 (dba_popen() may cause segfault during RSHUTDOWN). (cmb)
14+
1215
- IMAP:
1316
. Fixed bug #80800 (imap_open() fails when the flags parameter includes
1417
CL_EXPUNGE). (girgias)

ext/dba/dba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,9 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
863863
zend_bool close_both;
864864

865865
close_both = (info->fp != info->lock.fp);
866-
php_stream_close(info->lock.fp);
866+
php_stream_free(info->lock.fp, persistent ? PHP_STREAM_FREE_CLOSE_PERSISTENT : PHP_STREAM_FREE_CLOSE);
867867
if (close_both) {
868-
php_stream_close(info->fp);
868+
php_stream_free(info->fp, persistent ? PHP_STREAM_FREE_CLOSE_PERSISTENT : PHP_STREAM_FREE_CLOSE);
869869
}
870870
info->fp = NULL;
871871
info->lock.fp = NULL;

0 commit comments

Comments
 (0)