From: Martin Liska Date: Thu, 19 May 2016 15:05:53 +0000 (+0200) Subject: Fix memory leak in tree-vect-slp.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e078af89e237f8c4e139703a1bb83bd7671858c;p=gcc.git Fix memory leak in tree-vect-slp.c * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release bitmap. From-SVN: r236468 --- 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);