aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2015-10-12 20:31:44 +0300
committerLasse Collin <lasse.collin@tukaani.org>2015-10-12 20:31:44 +0300
commit09f395b6b360c0b13e8559eece1d179b908ebd3a (patch)
tree0d240fb5ce7dbb1f3732373b90bef9a3505d764f /src
parentliblzma: Fix a memory leak in error path of lzma_index_dup(). (diff)
downloadxz-09f395b6b360c0b13e8559eece1d179b908ebd3a.tar.xz
liblzma: Add a note to index.c for those using static analyzers.
Diffstat (limited to 'src')
-rw-r--r--src/liblzma/common/index.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c
index 62e4f8ba..bc1ef292 100644
--- a/src/liblzma/common/index.c
+++ b/src/liblzma/common/index.c
@@ -829,6 +829,9 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
s->groups.rightmost = &newg->node;
lzma_free(g, allocator);
+
+ // NOTE: newg isn't leaked here because
+ // newg == (void *)&newg->node.
}
}