# Small fix for msvcrt locking code

Matt Lavin matt.lavin at gmail.com
Fri Aug 19 04:39:26 BST 2005

```This should fix many warnings being reported to the console when using
msvrt locking.  This is my very first time looking at or modifying the
source of bzr, so I could be way off base.  I couldn't figure out how to
create a nice patch file that I think I've seen on this list but here is
the diff

--- bzrlib\lock.py
+++ bzrlib\lock.py
@@ -168,6 +168,8 @@
LOCK_NB = 4
def unlock(self):
_msvc_unlock(self.f)
+                    self.f.close()
+                    self.f = None