From: Lasse Collin Date: Fri, 27 Jul 2018 13:02:58 +0000 (+0300) Subject: liblzma: Remove an always-true condition from lzma_index_cat(). X-Git-Tag: v5.3.2alpha~164 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3cbcaeb07eb7543735befd6f507fdb5fa4363cff;p=thirdparty%2Fxz.git 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. --- 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);