mirror of
https://git.tukaani.org/xz.git
synced 2025-12-12 00:18: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:
|
error:
|
||||||
// Free the options which we have already allocated.
|
// Free the options which we have already allocated.
|
||||||
while (i-- > 0)
|
while (i > 0)
|
||||||
lzma_free(dest[i].options, allocator);
|
lzma_free(dest[--i].options, allocator);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user