diff options
Diffstat (limited to 'ext/dba/dba.c')
| -rw-r--r-- | ext/dba/dba.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c index d58a92dd85..ed74bbbb7e 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -321,10 +321,18 @@ static void dba_close(dba_info *info TSRMLS_DC) pefree(info->path, info->flags&DBA_PERSISTENT); } if (info->fp && info->fp!=info->lock.fp) { - php_stream_close(info->fp); + if(info->flags&DBA_PERSISTENT) { + php_stream_pclose(info->fp); + } else { + php_stream_close(info->fp); + } } if (info->lock.fp) { - php_stream_close(info->lock.fp); + if(info->flags&DBA_PERSISTENT) { + php_stream_pclose(info->lock.fp); + } else { + php_stream_close(info->lock.fp); + } } if (info->lock.name) { pefree(info->lock.name, info->flags&DBA_PERSISTENT); |
