From b48fb5b6a950a6757b790e9160967065a3e03978 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 27 Sep 2006 16:27:10 -0700 Subject: grep: free expressions and patterns when done. Signed-off-by: Junio C Hamano --- builtin-grep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin-grep.c') diff --git a/builtin-grep.c b/builtin-grep.c index 6718788173..4205e5d38d 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -325,6 +325,7 @@ static int grep_cache(struct grep_opt *opt, const char **paths, int cached) else hit |= grep_file(opt, ce->name); } + free_grep_patterns(opt); return hit; } @@ -694,5 +695,6 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (grep_object(&opt, paths, real_obj, list.objects[i].name)) hit = 1; } + free_grep_patterns(&opt); return !hit; } -- cgit v1.2.3