mirror of
https://git.tukaani.org/xz.git
synced 2025-12-11 16:08:45 +00:00
liblzma: Refactor a loop in lzma_filters_copy()
Arguably it's nicer if i doesn't wrap around when the loop terminates.
Fixes: Coverity CID 464589
Fixes: 6d118a0b9def ("Add lzma_filters_copy().")
This commit is contained in:
parent
90b67853d5
commit
6cc2da0a4b
@ -213,8 +213,8 @@ lzma_filters_copy(const lzma_filter *src, lzma_filter *real_dest,
|
||||
|
||||
error:
|
||||
// Free the options which we have already allocated.
|
||||
while (i-- > 0)
|
||||
lzma_free(dest[i].options, allocator);
|
||||
while (i > 0)
|
||||
lzma_free(dest[--i].options, allocator);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user