fix clean return path user code handle

Signed-off-by: Andy Green <andy.green@linaro.org>