From 3cbcaeb07eb7543735befd6f507fdb5fa4363cff Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 27 Jul 2018 16:02:58 +0300 Subject: liblzma: Remove an always-true condition from lzma_index_cat(). This should help static analysis tools to see that newg isn't leaked. Thanks to Pavel Raiskup. --- src/liblzma/common/index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liblzma/common') diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c index 26e4e519..007e1570 100644 --- a/src/liblzma/common/index.c +++ b/src/liblzma/common/index.c @@ -825,8 +825,8 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src, s->groups.root = &newg->node; } - if (s->groups.rightmost == &g->node) - s->groups.rightmost = &newg->node; + assert(s->groups.rightmost == &g->node); + s->groups.rightmost = &newg->node; lzma_free(g, allocator); -- cgit v1.2.3