Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-03-28 07:57:52 +0300
committerGlenn L McGrath <bug1@ihug.co.nz>2003-03-28 07:57:52 +0300
commitb08e3e8c2e1334ba00df7d818b586815b328a4b0 (patch)
treec1bc7f045e0a1d0d14324760c8807025d96f0957 /editors/sed.c
parent961c6c19da488d0b69cd2e7d4098acaaaa5b1179 (diff)
fix q command
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 5fe435622..78d46091f 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -848,8 +848,11 @@ static void process_file(FILE *file)
}
break;
case 'q': /* Branch to end of script and quit */
- free(line);
- return;
+ deleted = 1;
+ /* Exit the outer while loop */
+ free(next_line);
+ next_line = NULL;
+ break;
case 'n': /* Read next line from input */
free(line);
line = next_line;