Linux seems like a more strict environment on leaking data, fixed some bugs:
Writing (and then freeing) not allocated memory in main_credential_cache
Removed unused _cookiejar
Seems like we are not allowed to free a temp file