Re: [PATCH] Fix memory leak in vect_pattern_recog_1

2011-10-05 Thread Ira Rosen
On 5 October 2011 20:06, Jakub Jelinek wrote: > Hi! > > If vect_recog_func fails (or the other spot where vect_pattern_recog_1 > returns early), the vector allocated in the function isn't freed, leading > to memory leak.  But, more importantly, doing a VEC_alloc + VEC_free > num_stmts_in_loop * NU

[PATCH] Fix memory leak in vect_pattern_recog_1

2011-10-05 Thread Jakub Jelinek
Hi! If vect_recog_func fails (or the other spot where vect_pattern_recog_1 returns early), the vector allocated in the function isn't freed, leading to memory leak. But, more importantly, doing a VEC_alloc + VEC_free num_stmts_in_loop * NUM_PATTERNS times seems to be completely unnecessary, the f