From 247ac6c41f9f719ad9491647dc84721c3a0bed95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 11 Jan 2017 15:27:04 +0100 Subject: [PATCH] utils: fix coverity warning 155456 I think the memory wouldn't really leak, due to being on a per-request mempool, but it still seems better to do this properly. --- lib/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils.c b/lib/utils.c index 35a7c19b2..2588ba159 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -450,6 +450,7 @@ int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr, } knot_rrset_t *copy = knot_rrset_copy(rr, pool); if (!copy) { + mm_free(pool, entry); return kr_error(ENOMEM); } -- 2.47.3