summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2017-02-10 13:13:20 +1100
committerDaniel Axtens <dja@axtens.net>2017-02-10 13:20:42 +1100
commit10e096fe097a489eec41bad120f5b5e52fa4b61c (patch)
treebd2f626fb4181f49dc84ef9dc1e12826fd821ef9
parent0794b31c623e4cede76d66be730719d24debcca9 (diff)
ISA-L: free matrix on exit
isa_l_common_init allocates desc->matrix, but this isn't freed in isa_l_exit. Instead, the entire isa_l_desc structure is freed, thus leaking the memory. Explicitly free desc->matrix. Change-Id: Ibf672d1a309498591b87d739632a90a1b3704f7e Signed-off-by: Daniel Axtens <dja@axtens.net>
Notes
Notes (review): Code-Review+1: Chris Smart <mail@csmart.io> Code-Review+2: Tim Burke <tim@swiftstack.com> Code-Review+1: Kevin Greenan <kmgreen2@gmail.com> Code-Review+2: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp> Workflow+1: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 15 Feb 2017 08:01:04 +0000 Reviewed-on: https://review.openstack.org/431812 Project: openstack/liberasurecode Branch: refs/heads/master
-rw-r--r--src/backends/isa-l/isa_l_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backends/isa-l/isa_l_common.c b/src/backends/isa-l/isa_l_common.c
index 07deb13..b7fb05e 100644
--- a/src/backends/isa-l/isa_l_common.c
+++ b/src/backends/isa-l/isa_l_common.c
@@ -444,6 +444,7 @@ int isa_l_exit(void *desc)
444 444
445 isa_l_desc = (isa_l_descriptor*) desc; 445 isa_l_desc = (isa_l_descriptor*) desc;
446 446
447 free(isa_l_desc->matrix);
447 free(isa_l_desc); 448 free(isa_l_desc);
448 449
449 return 0; 450 return 0;