summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/grep/grep.c')
-rw-r--r--usr.bin/grep/grep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 70fd9bd..117a5a9 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
case 'e':
{
char *token;
- char *string = strdup(optarg);
+ char *string = optarg;
while ((token = strsep(&string, "\n")) != NULL)
add_pattern(token, strlen(token));
@@ -675,7 +675,7 @@ main(int argc, char *argv[])
/* Process patterns from command line */
if (aargc != 0 && needpattern) {
char *token;
- char *string = strdup(*aargv);
+ char *string = *aargv;
while ((token = strsep(&string, "\n")) != NULL)
add_pattern(token, strlen(token));
OpenPOWER on IntegriCloud