aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2012-05-21 18:10:09 +0200
committerJunio C Hamano <gitster@pobox.com>2012-05-21 15:02:08 -0700
commitec83061156e18ce600384d3c57f90729a9295488 (patch)
tree7e4a385ecbbcd9f8de258a0e3ec4c33108afa671 /Makefile
parent526a858a99ace6698823740374edc3e35b87901a (diff)
downloadgit-ec83061156e18ce600384d3c57f90729a9295488.tar.gz
git-ec83061156e18ce600384d3c57f90729a9295488.tar.xz
grep: stop leaking line strings with -f
When reading patterns from a file, we pass the lines as allocated string buffers to append_grep_pat() and never free them. That's not a problem because they are needed until the program ends anyway. However, now that the function duplicates the pattern string, we can reuse the strbuf after calling that function. This simplifies the code a bit and plugs a minor memory leak. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions