summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-16 23:47:58 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-16 23:47:58 -0700
commit050dfc4535578c2c49832ffeb3f05dbd4c6adff2 (patch)
tree216b983a3c019f5a8a3721550afcb271d2185dbb /builtin-grep.c
parentb3118bdc91876cbc04b7e81dcf7bea71d86ce4f8 (diff)
parentcfe370c6476392095bc3f18013d195b1cccd6184 (diff)
downloadgit-050dfc4535578c2c49832ffeb3f05dbd4c6adff2.tar.gz
Merge branch 'maint-1.6.4' into maint
* maint-1.6.4: grep: do not segfault when -f is used
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 761799d7d0..1df25b07b5 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -631,7 +631,7 @@ static int file_callback(const struct option *opt, const char *arg, int unset)
struct grep_opt *grep_opt = opt->value;
FILE *patterns;
int lno = 0;
- struct strbuf sb;
+ struct strbuf sb = STRBUF_INIT;
patterns = fopen(arg, "r");
if (!patterns)