From 6e078af89e237f8c4e139703a1bb83bd7671858c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 19 May 2016 17:05:53 +0200 Subject: [PATCH] Fix memory leak in tree-vect-slp.c * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release bitmap. From-SVN: r236468 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-slp.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6e8bfb2ad2..ab513e6cac4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-19 Martin Liska + + * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release + bitmap. + 2016-05-19 Martin Liska * omp-simd-clone.c (simd_clone_adjust): Release vector. diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index d71384881b7..66db7d5c01e 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1308,7 +1308,10 @@ vect_attempt_slp_rearrange_stmts (slp_instance slp_instn) FOR_EACH_VEC_ELT (node->load_permutation, i, lidx) { if (lidx >= group_size) - return false; + { + sbitmap_free (load_index); + return false; + } if (bitmap_bit_p (load_index, lidx)) { sbitmap_free (load_index); -- 2.30.2