Fix a memory leak (free lock_path in lock_exit()).

Spotted by valgrind