aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-11-26 22:25:30 +0200
committerLasse Collin <lasse.collin@tukaani.org>2022-11-26 22:25:30 +0200
commit11fe708db783ac36ebeeb85da164e29e8c300910 (patch)
tree5545c677b4e897fb2726c89e7ead9c57155df06e /src
parentliblzma: Use lzma_filters_free() in more places. (diff)
downloadxz-11fe708db783ac36ebeeb85da164e29e8c300910.tar.xz
xz: Use lzma_filters_free().
Diffstat (limited to '')
-rw-r--r--src/xz/list.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/xz/list.c b/src/xz/list.c
index 22d7c52b..b532a25b 100644
--- a/src/xz/list.c
+++ b/src/xz/list.c
@@ -523,9 +523,7 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter,
case LZMA_DATA_ERROR:
// Free the memory allocated by lzma_block_header_decode().
- for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
- free(filters[i].options);
-
+ lzma_filters_free(filters, NULL);
goto data_error;
default:
@@ -571,9 +569,7 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter,
message_filters_to_str(bhi->filter_chain, filters, false);
// Free the memory allocated by lzma_block_header_decode().
- for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
- free(filters[i].options);
-
+ lzma_filters_free(filters, NULL);
return false;
data_error: