From: Grigorii Demidov Date: Wed, 11 Jul 2018 13:50:03 +0000 (+0200) Subject: daemon: broken incoming TCP stream can lead to memory leaks in some circumstances... X-Git-Tag: v2.4.1~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9b9c2d4c7a4e16ccb62e874c9680471899d86e4;p=thirdparty%2Fknot-resolver.git daemon: broken incoming TCP stream can lead to memory leaks in some circumstances, fixed --- diff --git a/daemon/worker.c b/daemon/worker.c index 7adc79c34..3ad269247 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -2401,6 +2401,8 @@ int worker_process_tcp(struct worker_ctx *worker, uv_stream_t *handle, /* Drop malformed packet and retry resolution */ pkt = NULL; ret = 0; + } else { + qr_task_complete(task); } /* Only proceed if the message is valid, or it's an invalid response to * an outbound query which needs to be treated as a timeout. */