grep: Fix two memory leaks
We duplicate the grep_opt structure when using grep threads, but didn't later free either the patterns attached to this new structure or the structure itself. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									31d87385c4
								
							
						
					
					
						commit
						bfac23d953
					
				|  | @ -205,6 +205,8 @@ static void *run(void *arg) | ||||||
|  |  | ||||||
| 		work_done(w); | 		work_done(w); | ||||||
| 	} | 	} | ||||||
|  | 	free_grep_patterns(arg); | ||||||
|  | 	free(arg); | ||||||
|  |  | ||||||
| 	return (void*) (intptr_t) hit; | 	return (void*) (intptr_t) hit; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Dan McGee
						Dan McGee