Fix segfault when cleaning up

This commit is contained in:
Glenn L McGrath 2003-04-27 02:22:01 +00:00
parent 26df70a823
commit c5408fe7f7

View File

@ -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++;
}
}