Fix potential memory leak and libpsl configure