free memory after trying to establish p2p