diff --git a/django/core/files/storage.py b/django/core/files/storage.py index c1e654beeb..b9f3e01f0d 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -215,6 +215,7 @@ class FileSystemStorage(Storage): _file = os.fdopen(fd, mode) _file.write(chunk) finally: + content.close() locks.unlock(fd) if _file is not None: _file.close()