Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/webserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ MHD_Result webserver::finalize_answer(MHD_Connection* connection, struct details
if (found) {
try {
if (hrm->is_allowed(method)) {
if (mr->pp != NULL) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we use nullptr instead of NULL

MHD_destroy_post_processor(mr->pp);
mr->pp = NULL;
}

mr->dhrs = ((hrm)->*(mr->callback))(*mr->dhr); // copy in memory (move in case)
if (mr->dhrs.get() == nullptr || mr->dhrs->get_response_code() == -1) {
mr->dhrs = internal_error_page(mr);
Expand Down