make sure locks are actually released

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix tabulation error

Signed-off-by: Mattias Andrée <maandree@operamail.com>