Fix grp_lock crash due to error path clean-up.
Merge pull request #632 from plfrancis/grp_lock_crash_fix

Fix grp_lock crash due to error path clean-up.