Fix memory leak in tree-vect-slp.c
authorMartin Liska <mliska@suse.cz>
Thu, 19 May 2016 15:05:53 +0000 (17:05 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 19 May 2016 15:05:53 +0000 (15:05 +0000)
* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release
bitmap.

From-SVN: r236468

gcc/ChangeLog
gcc/tree-vect-slp.c

index e6e8bfb2ad287bd0886069edce3e608b2612b8f7..ab513e6cac4b704d63b9a32179a91df02d06ca2e 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-19  Martin Liska  <mliska@suse.cz>
+
+       * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release
+       bitmap.
+
 2016-05-19  Martin Liska  <mliska@suse.cz>
 
        * omp-simd-clone.c (simd_clone_adjust): Release vector.
index d71384881b72a272ba510dd4237362e3e5c552b5..66db7d5c01e994ed18acd0c9c0a302c6e96ab83e 100644 (file)
@@ -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);