diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-19 21:37:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-19 21:37:21 -0700 |
commit | df3b1192650c6753932a0897c4608fcc22ca8d47 (patch) | |
tree | 25617fa7ac42ab4b05f5064a4c8f97ef63e5235e /builtin/grep.c | |
parent | eb3af74e93953df7917dca43d264ac8d1fb85671 (diff) | |
parent | 7861fa07c38d72a4fa6ae2e802553b8b0f3731d4 (diff) | |
download | git-df3b1192650c6753932a0897c4608fcc22ca8d47.tar.gz |
Merge branch 'ab/grep-plug-pathspec-leak'
Call clear_pathspec() to release resources immediately before the
cmd_grep() function returns.
* ab/grep-plug-pathspec-leak:
grep: plug a trivial memory leak
Diffstat (limited to 'builtin/grep.c')
-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 65070c52fc..3ffb5b4e81 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1299,6 +1299,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; } |