]> granicus.if.org Git - php/commitdiff
don't forget to close the stream when/if flock() fails
authorAntony Dovgal <tony2001@php.net>
Mon, 13 Nov 2006 20:31:15 +0000 (20:31 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 13 Nov 2006 20:31:15 +0000 (20:31 +0000)
ext/standard/file.c

index be50f0dc617633549e98e8c90c2c43f8561cae26..e8407ad1ce83ed203416228223df12c6e71f277d 100644 (file)
@@ -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;
        }