Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ CB_context_dump(TSCont, TSEvent, void *edata)
for (int i = 0; i < count; i += 2) {
dump_context(results[i], results[i + 1]);
}
free(results);
}
}
TSTextLogObjectFlush(context_dump_log);
Expand Down
5 changes: 5 additions & 0 deletions plugins/experimental/stale_response/stale_response.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#pragma once

#include <cstdlib>

#include "ts/apidefs.h"
#include "ts_wrap.h"
#include "ts/ts.h"
Expand Down Expand Up @@ -63,6 +65,9 @@ struct ConfigInfo {
if (this->body_data_mutex) {
TSMutexDestroy(this->body_data_mutex);
}
if (this->log_info.filename != PLUGIN_TAG) {
free(const_cast<char *>(this->log_info.filename));
}
}
UintBodyMap *body_data = nullptr;
TSMutex body_data_mutex;
Expand Down
9 changes: 9 additions & 0 deletions plugins/origin_server_auth/origin_server_auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ class S3Config;
class ConfigCache
{
public:
~ConfigCache();

S3Config *get(const char *fname);

private:
Expand Down Expand Up @@ -601,6 +603,13 @@ class S3Config
int _invalid_file_count = 0;
};

ConfigCache::~ConfigCache()
{
for (auto &[key, data] : _cache) {
delete data.config.load();
}
}

bool
S3Config::parse_config(const std::string &config_fname)
{
Expand Down