Commit 017a78d0 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

better bailing-out cleanup if a malloc fails in the DNS cache

parent 9010bd38
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -344,6 +344,11 @@ int Curl_resolv(struct connectdata *conn,
      
      if(data->share)
        Curl_share_unlock(data, CURL_LOCK_DATA_DNS);

      if(!dns) {
        /* returned failure, bail out nicely */
        Curl_freeaddrinfo(addr);
      }
    }
  }