aboutsummaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
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 8213ce240..6430f6d79 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -1048,7 +1048,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
/* ignore empty line like grep does */
if (!buf[0])
continue;
- add_pattern(&opt, strdup(buf), argv[1], ++lno,
+ add_pattern(&opt, xstrdup(buf), argv[1], ++lno,
GREP_PATTERN);
}
fclose(patterns);