From 0ec50e9055d620738ddf05aec253e2a72fd5f1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Wed, 23 Aug 2017 16:42:06 +0200 Subject: [PATCH] [ticket/15305] Close stream before throwing an exception PHPBB3-15305 --- phpBB/phpbb/storage/adapter/local.php | 1 + 1 file changed, 1 insertion(+) 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'); } }