Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ab/grep-plug-pathspec-leak'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 20 Apr 2017 04:37:21 +0000
(21:37 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 20 Apr 2017 04:37:21 +0000
(21:37 -0700)
Call clear_pathspec() to release resources immediately before the
cmd_grep() function returns.
* ab/grep-plug-pathspec-leak:
grep: plug a trivial memory leak
builtin/grep.c
patch
|
blob
|
history
raw
(from parent 1:
eb3af74
)
diff --git
a/builtin/grep.c
b/builtin/grep.c
index 65070c52fc2da84bc48804817f1e714f755c9ab5..3ffb5b4e8176bbcd1ecf2e4ae2dc84aee968cd22 100644
(file)
--- 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;
}