planet: Fix possible deadlock

Unlock rwlock when failing, otherwise we might have a deadlock on our
hands.
Merge pull request #3 from gonzzor/deadlock

planet: Fix possible deadlock