Avoid memory leaks (curl_slist_append internally copies the data), avoid duplicate frees in some error cases, use strdup().
Avoid memory leaks (curl_slist_append internally copies the data),
avoid duplicate frees in some error cases, use strdup().

pycurl/pycurl,pycurl/pycurl,pycurl/pycurl,p/pycurl-archived,p/pycurl-archived,p/pycurl-archived