diff options
-rw-r--r-- | builtin/grep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 9304c33e75..1b642b70e7 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1293,6 +1293,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) hit |= wait_all(); if (hit && show_in_pager) run_pager(&opt, prefix); + clear_pathspec(&pathspec); free_grep_patterns(&opt); return !hit; } |