zip_support: Fix potential memory leaks