Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
grep: do not segfault when -f is used
[gitweb.git]
/
builtin-grep.c
diff --git
a/builtin-grep.c
b/builtin-grep.c
index fd450bc16e56a634b14cfa33f77e5192412643d8..e3b940b93334f99f610f84a86c9da11a435d1365 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-599,7
+599,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)