From fde3e48fbf130a3124fb304e031f1716f97e44d1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 15 Apr 2019 12:54:35 -0700 Subject: [PATCH] modules/s_fetch: Call for explicit destruction/cancel on error. --- modules/s_fetch.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/s_fetch.cc b/modules/s_fetch.cc index 6d0e72626..9fa68a545 100644 --- a/modules/s_fetch.cc +++ b/modules/s_fetch.cc @@ -830,7 +830,7 @@ try request.started = ircd::time(); request.last = ircd::time(); - static_cast(request) = + *static_cast(&request) = { request.event_id, request.buf, std::move(opts) }; @@ -864,6 +864,8 @@ catch(const std::exception &e) e.what() }; + server::cancel(request); + static_cast(&request)->~event(); request.origin = {}; return false; }