mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
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
This commit is contained in:
commit
df3b119265
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user