diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index 159c85b522..de63d0f6a5 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -231,6 +231,7 @@ class local implements adapter_interface, stream_interface if (stream_copy_to_stream($resource, $stream) === false) { + fclose($stream); throw new exception('STORAGE_CANNOT_COPY_RESOURCE'); } }