planet: Fix possible deadlock

Unlock rwlock when failing, otherwise we might have a deadlock on our
hands.