thor: fix error path after g_dnl_register() failure

Set command return value and perform needed cleanup when g_dnl_register()
function fails.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
1 file changed