[Patch #1587139 by kxroberto] Protect lock acquisition/release with
try...finally to ensure the lock is always released.  This could use
the 'with' statement, but the patch uses 'finally'.

2.5 backport candidate.
1 file changed