Skip to content

Commit 0b2bb98

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
2 parents f89f600 + eae69fc commit 0b2bb98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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
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)