summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hensley <john@cabincode.com>2013-09-06 15:01:54 -0400
committerTim Graham <timograham@gmail.com>2013-09-10 08:33:53 -0400
commit30fc49a7ca0d030c7855f31ed44395903fa6abdd (patch)
tree9e9a0b0238b0db1993040a7161948276512f8351
parentf2a44528825ac07ca28c8bb7dc01b4375df8dc2c (diff)
Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files.
-rw-r--r--django/core/files/storage.py1
1 files changed, 1 insertions, 0 deletions
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()