Fix memory leak when PREPARE or DEALLOCATE is failed.
Fix memory leak when PREPARE or DEALLOCATE is failed.

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