Dan McGee  committed bfac23d

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 <>
Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits 31d8738

Comments (0)

Files changed (1)

File builtin-grep.c

+	free_grep_patterns(arg);
+	free(arg);
 	return (void*) (intptr_t) hit;