title: Do i required to cleanup the curl_easy_strerror buffer?
body: <p>I wrote wrapper over curl library API's in c++. And I am trying to use if for request/response in c++.Sometimes the request failed before it send to server as curl api's return some strerror.I am transferring that string error to my application.Do I need to clean it?</p>
  
  <p>My code looks like as follows,</p>
  
  <pre><code>int HttpClientImplCurl::get(void*&amp; aOutBuf, base::Size&amp; aOutSize,void*&amp; aOutRecvHeaderBuf, base::Size&amp; aOutRecvHeaderSize, const char*&amp; errorBuff)
  {
          HttpClientImplCurlCleaner    lCleaner(this); // Cleans up when it goes out of context
          struct curl_slist*          lHeaders = NULL;
  
          // setup get
          CURLcode lCode = curl_easy_setopt(curlHandle, CURLOPT_URL,
                                            aInClient.getUrl().getBuffer());
  
          if (lCode != 0) {
              errorBuff = curl_easy_strerror(lCode);
              return lCode;
          }
  
  }
  </code></pre>
  
  <p>I am doing curl_easy_cleanup(curlHandle) in my destructor.</p>
  
  <p>Here I am setting curl_easy_strerror to my const char*&amp; errorBuff. which I am using in application. Should I do a free(errorBuff)?</p>
  
  <p>Or any curl library api, which I need to use to clean up similar to</p>
  
  <pre><code>struct curl_slist*          lHeaders = NULL;
   lHeaders = curl_slist_append(lHeaders,lMultiHeader.getBuffer());
   curl_slist_free_all(lHeaders);?
  </code></pre>
  
  <p>Or it doesn't required and curl_easy_cleanup will take care the clean up?</p>