Stop memory leak from curl