summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-06-08 22:04:55 (GMT)
committerYann Collet <cyan@fb.com>2017-06-08 22:04:55 (GMT)
commit0beaa356f26aa5ee9d37673a5e72d8bc751f69c2 (patch)
treeacded46cfe815a9c0c04049fd9151f4437729b64 /examples
parent775e63ee01af461d20a607f658ca3795ff738157 (diff)
downloadlz4-0beaa356f26aa5ee9d37673a5e72d8bc751f69c2.zip
lz4-0beaa356f26aa5ee9d37673a5e72d8bc751f69c2.tar.gz
lz4-0beaa356f26aa5ee9d37673a5e72d8bc751f69c2.tar.bz2
fixed minor scan-build warning
Diffstat (limited to 'examples')
-rw-r--r--examples/simple_buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/simple_buffer.c b/examples/simple_buffer.c
index ee29148..403d9e8 100644
--- a/examples/simple_buffer.c
+++ b/examples/simple_buffer.c
@@ -75,6 +75,7 @@ int main(void) {
// where the regen_buffer memory location is, and how large regen_buffer (uncompressed) output will be.
// Again, save the return_value.
const int decompressed_size = LZ4_decompress_safe(compressed_data, regen_buffer, compressed_data_size, src_size);
+ free(compressed_data); /* no longer useful */
if (decompressed_size < 0)
run_screaming("A negative result from LZ4_decompress_safe indicates a failure trying to decompress the data. See exit code (echo $?) for value returned.", decompressed_size);
if (decompressed_size == 0)