Fix: missing registry unlock on error

Signed-off-by: David Goulet <dgoulet@ev0ke.net>