summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--storage/formats/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py
index 784bb1c79..e68684c31 100644
--- a/storage/formats/__init__.py
+++ b/storage/formats/__init__.py
@@ -258,8 +258,10 @@ class DeviceFormat(object):
pass
else:
log.error("error zeroing out %s: %s" % (self.device, e))
+ os.close(fd)
except Exception as e:
log.error("error zeroing out %s: %s" % (self.device, e))
+ os.close(fd)
self.exists = False