Mercurial > minori
comparison src/core/http.cc @ 396:8ed3b5e8f205
http: fix double-free
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 07 Nov 2025 07:56:03 -0500 |
| parents | 963047512d34 |
| children | 811697ad826a |
comparison
equal
deleted
inserted
replaced
| 395:20553b1ea84d | 396:8ed3b5e8f205 |
|---|---|
| 194 curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); | 194 curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); |
| 195 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &RequestThread::WriteCallback); | 195 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &RequestThread::WriteCallback); |
| 196 | 196 |
| 197 CURLcode res = curl_easy_perform(curl); | 197 CURLcode res = curl_easy_perform(curl); |
| 198 session.IncrementRequests(); | 198 session.IncrementRequests(); |
| 199 curl_easy_cleanup(curl); | |
| 200 | 199 |
| 201 if (res != CURLE_OK && !(res == CURLE_WRITE_ERROR && cancelled_)) | 200 if (res != CURLE_OK && !(res == CURLE_WRITE_ERROR && cancelled_)) |
| 202 session.SetStatusBar(std::string("curl_easy_perform(curl) failed!: ") + curl_easy_strerror(res)); | 201 session.SetStatusBar(std::string("curl_easy_perform(curl) failed!: ") + curl_easy_strerror(res)); |
| 203 } | 202 } |
| 204 | 203 |
