Commit a660c0db authored by Dan Fandrich's avatar Dan Fandrich
Browse files

easy: Fixed a memory leak on OOM condition

parent 3521e4e4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -715,6 +715,15 @@ static CURLcode easy_transfer(CURLM *multi)
      }
    }
  }

  /* Make sure to return some kind of error if there was a multi problem */
  if(mcode) {
    return (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY :
            /* The other multi errors should never happen, so return
               something suitably generic */
            CURLE_BAD_FUNCTION_ARGUMENT;
  }

  return code;
}