diff --git a/src/json_rpc_request.cpp b/src/json_rpc_request.cpp index e05e88a..6fb062e 100644 --- a/src/json_rpc_request.cpp +++ b/src/json_rpc_request.cpp @@ -495,6 +495,8 @@ void Call(const std::string& address, int port, const std::string& req, const st catch (const std::exception& e) { const char* msg = e.what(); (*close_cb)(msg, strlen(msg), 0.0); + delete cb; + delete close_cb; } }); @@ -502,6 +504,8 @@ void Call(const std::string& address, int port, const std::string& req, const st static constexpr char err[] = "CallOnLoop failed"; LOGERR(1, err); (*close_cb)(err, sizeof(err) - 1, 0.0); + delete cb; + delete close_cb; } } diff --git a/src/p2pool.cpp b/src/p2pool.cpp index 4809d21..4cac425 100644 --- a/src/p2pool.cpp +++ b/src/p2pool.cpp @@ -658,7 +658,7 @@ void p2pool::submit_aux_block_async(const std::vector& aux_b // If p2pool is stopped, m_submitAuxBlockAsync is most likely already closed if (m_stopped) { - LOGWARN(0, "p2pool is shutting down, but a block was found. Trying to submit it anyway!"); + LOGWARN(0, "p2pool is shutting down, but an aux block was found. Trying to submit it anyway!"); submit_aux_block(); return; }