[BusyBox-cvs] busybox/editors sed.c,1.111,1.112

Glenn McGrath bug1 at busybox.net
Fri Mar 28 04:57:56 UTC 2003


Update of /var/cvs/busybox/editors
In directory winder:/tmp/cvs-serv23535/editors

Modified Files:
	sed.c 
Log Message:
fix q command


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- sed.c	28 Mar 2003 04:43:39 -0000	1.111
+++ sed.c	28 Mar 2003 04:57:52 -0000	1.112
@@ -848,8 +848,11 @@
 						}
 						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;




More information about the busybox-cvs mailing list