Enforce types
free msg since its copied in libcurl
cleanups