Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mrtazz/restclient-cpp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: watsocd/restclient-cpp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 7, 2015

  1. If the remote server does not respond to the request, line 223 return…

    …s from the PUT function before doing the CURL cleanups on lines 229 thru 231. This causes a memory leak.
    
    I tested the following code change with the PUT function and it resolves the leak. I made changes in all functions that had similar code.
    
    if (res != CURLE_OK)
    {
    ret.body = "Failed to query.";
    ret.code = -1;
    //return ret; //Commented the return
    } else { //else added here
    long http_code = 0;
    curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
    ret.code = static_cast(http_code);
    }
    
    Functions now have only one return statement.
    Chuck committed Aug 7, 2015
    Configuration menu
    Copy the full SHA
    d0db4da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6915d36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da38928 View commit details
    Browse the repository at this point in the history
Loading