From: Dan Fandrich Date: Tue, 28 Jan 2014 22:55:04 +0000 (+0100) Subject: oauth2: Fixed a memory leak in an OOM condition X-Git-Tag: curl-7_35_0~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a20f592376cc0071505e935db35d75b08fb35aa;p=curl oauth2: Fixed a memory leak in an OOM condition --- diff --git a/lib/url.c b/lib/url.c index 665133fa0..a870cc5d3 100644 --- a/lib/url.c +++ b/lib/url.c @@ -5176,7 +5176,8 @@ static CURLcode create_conn(struct SessionHandle *data, if(data->set.str[STRING_BEARER]) { conn->xoauth2_bearer = strdup(data->set.str[STRING_BEARER]); if(!conn->xoauth2_bearer) { - return CURLE_OUT_OF_MEMORY; + result = CURLE_OUT_OF_MEMORY; + goto out; } }