summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--findutils/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index 908f391..e26a8d5 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -343,7 +343,7 @@ extern int grep_main(int argc, char **argv)
if (argv[optind] == NULL)
bb_show_usage();
else {
- pattern_head = llist_add_to(pattern_head, argv[optind]);
+ pattern_head = llist_add_to(pattern_head, strdup(argv[optind]));
optind++;
}
}