mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix a memory leak with the CivetWeb callbacks in telemetry
This commit is contained in:
parent
65678fbfdb
commit
32fe94f0f8
1 changed files with 3 additions and 0 deletions
|
@ -66,6 +66,9 @@ void Manager::InitPostScript() {
|
|||
|
||||
try {
|
||||
prometheus_exposer = std::make_unique<prometheus::Exposer>(prometheus_url, 2, callbacks);
|
||||
|
||||
// CivetWeb stores a copy of the callbacks, so we're safe to delete the pointer here
|
||||
delete callbacks;
|
||||
} catch ( const CivetException& exc ) {
|
||||
reporter->FatalError("Failed to setup Prometheus endpoint: %s\n", exc.what());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue