Fix segfault when cleaning up
This commit is contained in:
parent
26df70a823
commit
c5408fe7f7
@ -343,7 +343,7 @@ extern int grep_main(int argc, char **argv)
|
|||||||
if (argv[optind] == NULL)
|
if (argv[optind] == NULL)
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
else {
|
else {
|
||||||
pattern_head = llist_add_to(pattern_head, argv[optind]);
|
pattern_head = llist_add_to(pattern_head, strdup(argv[optind]));
|
||||||
optind++;
|
optind++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user