diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-27 16:27:10 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-27 16:27:10 -0700 |
commit | b48fb5b6a950a6757b790e9160967065a3e03978 (patch) | |
tree | 7ba2dda07f7bd01000f2c198b15bc8f6174998c1 /builtin-grep.c | |
parent | 209e7569313aa045da6d55e333c884e49e7d8fb2 (diff) | |
download | git-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.c | 2 |
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; } |