From: Vladimír Čunát Date: Fri, 30 Jun 2017 06:48:59 +0000 (+0200) Subject: rplan: fix a coverity warning (CID 164834) X-Git-Tag: v1.3.2~15^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ce9976e9f925162fae79e86269318c487be01ee;p=thirdparty%2Fknot-resolver.git rplan: fix a coverity warning (CID 164834) There would be no real resource leak, as the memory is on a mempool, so the lifetime is limited by kr_request finishing. Also, it's only on an unlikely error branch, but still... --- diff --git a/lib/rplan.c b/lib/rplan.c index 68458ed5e..d2592414c 100644 --- a/lib/rplan.c +++ b/lib/rplan.c @@ -143,6 +143,7 @@ static struct kr_query *kr_rplan_push_query(struct kr_rplan *rplan, if (parent && (parent->flags & qry->flags & QUERY_FORWARD)) { ret = kr_nsrep_copy_set(&qry->ns, &parent->ns); if (ret) { + query_free(rplan->pool, qry); return NULL; } }