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 | |
parent | Merge branch 'jk/no-looking-at-dotgit-outside-repo' (diff) | |
parent | grep: plug a trivial memory leak (diff) | |
download | tgif-df3b1192650c6753932a0897c4608fcc22ca8d47.tar.xz |
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')
-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; } |