From: Dan Fandrich <dan@coneharvesters.com>
Date: Thu, 10 Jul 2008 18:15:22 +0000 (+0000)
Subject: Fixed another OOM problem, this time with test 64.
X-Git-Tag: cares-1_5_3~373
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f3ef94836155e8ddf261b8f0dbffe3cf05757ff;p=curl

Fixed another OOM problem, this time with test 64.
---

diff --git a/lib/transfer.c b/lib/transfer.c
index 11202af80..91e3f5908 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2386,8 +2386,11 @@ CURLcode Curl_perform(struct SessionHandle *data)
         if(res == CURLE_OK) {
           bool retry = Curl_retry_request(conn, &newurl);
 
-          if(retry)
+          if(retry) {
             follow = FOLLOW_RETRY;
+            if (!newurl)
+              res = CURLE_OUT_OF_MEMORY;
+          }
           else {
             /*
              * We must duplicate the new URL here as the connection data may