curl memory leaks avoid