prevent undefined values in finally block

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>