From c7fd59af0f904fa1408a1d55d5b04b33d8ba453b Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 13 Nov 2006 20:31:15 +0000 Subject: [PATCH] don't forget to close the stream when/if flock() fails --- ext/standard/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/file.c b/ext/standard/file.c index be50f0dc61..e8407ad1ce 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -649,6 +649,7 @@ PHP_FUNCTION(file_put_contents) } if (flags & LOCK_EX && php_stream_lock(stream, LOCK_EX)) { + php_stream_close(stream); RETURN_FALSE; } -- 2.50.1