Skip to content

Commit

Permalink
[fix] Fixed a memory leak in the custom admin request handler
Browse files Browse the repository at this point in the history
  • Loading branch information
pajama-coder committed Aug 18, 2023
1 parent 005ddfd commit bd16b05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ Worker::Admin::Handler::Handler(Admin *admin, Message *message, const std::funct
admin->m_handlers.push(this);
auto pl = admin->m_pipeline_layout.get();
auto *p = Pipeline::make(pl, pl->new_context());
m_pipeline = p;
p->chain(EventTarget::input());
p->start();
message->write(p->input());
Expand All @@ -595,6 +596,7 @@ void Worker::Admin::Handler::on_event(Event *evt) {
m_respond(m);
}
m->release();
delete this;
}
}

Expand Down

0 comments on commit bd16b05

Please sign in to comment.