4910,4911c4910,4915
<     else if(ret < 0 ) {
<       return CURLE_OUT_OF_MEMORY;
---
>     else if(ret < 0 ) 
> 	{
> 		/* We should not fail here if netrc is optional
> 		   Just do nothing and continue */
> 		if (data->set.use_netrc != CURL_NETRC_OPTIONAL)
> 			return CURLE_OUT_OF_MEMORY;

