From c5408fe7f7ed809f11dd406a403071715cc9bd06 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sun, 27 Apr 2003 02:22:01 +0000 Subject: Fix segfault when cleaning up --- findutils/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'findutils') diff --git a/findutils/grep.c b/findutils/grep.c index 908f39123..e26a8d5ad 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++; } } -- cgit v1.2.3