summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-27 16:27:10 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-27 16:27:10 -0700
commitb48fb5b6a950a6757b790e9160967065a3e03978 (patch)
tree7ba2dda07f7bd01000f2c198b15bc8f6174998c1 /builtin-grep.c
parent209e7569313aa045da6d55e333c884e49e7d8fb2 (diff)
downloadgit-b48fb5b6a950a6757b790e9160967065a3e03978.tar.gz
grep: free expressions and patterns when done.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 2 insertions, 0 deletions
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;
}