fix: Header memory leak in http requests class

This commit is contained in:
WerWolv
2023-03-23 12:08:33 +01:00
parent bb4819bce4
commit 9463105172
2 changed files with 2 additions and 1 deletions

View File

@@ -282,6 +282,7 @@ namespace hex {
curl_slist *headers = nullptr;
headers = curl_slist_append(headers, "Cache-Control: no-cache");
ON_SCOPE_EXIT { curl_slist_free_all(headers); };
for (auto &[key, value] : this->m_headers) {
std::string header = hex::format("{}: {}", key, value);