We could also use "goto error" and to the common cleanup there...