missing unlock in all exit paths