diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-03-28 04:57:52 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-03-28 04:57:52 +0000 |
commit | 017ba063cdcb92c8353f9dfffca1330fda3c7c0c (patch) | |
tree | c1bc7f045e0a1d0d14324760c8807025d96f0957 | |
parent | 65c8de04a3756b4ca48c78cb4444852822efc99c (diff) | |
download | busybox-w32-017ba063cdcb92c8353f9dfffca1330fda3c7c0c.tar.gz busybox-w32-017ba063cdcb92c8353f9dfffca1330fda3c7c0c.tar.bz2 busybox-w32-017ba063cdcb92c8353f9dfffca1330fda3c7c0c.zip |
fix q command
git-svn-id: svn://busybox.net/trunk/busybox@6763 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | editors/sed.c | 7 |
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) | |||
848 | } | 848 | } |
849 | break; | 849 | break; |
850 | case 'q': /* Branch to end of script and quit */ | 850 | case 'q': /* Branch to end of script and quit */ |
851 | free(line); | 851 | deleted = 1; |
852 | return; | 852 | /* Exit the outer while loop */ |
853 | free(next_line); | ||
854 | next_line = NULL; | ||
855 | break; | ||
853 | case 'n': /* Read next line from input */ | 856 | case 'n': /* Read next line from input */ |
854 | free(line); | 857 | free(line); |
855 | line = next_line; | 858 | line = next_line; |