This needs to be set here to avoid segfault on "goto exit" prior to initialization of ret below.