Fix memory leak in certain error case.
Fix memory leak in certain error case.

Per Coverity report "1111457 Resource leak".

treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres