[PATCH 4/5] ed: remove double free in join()

From: Thomas Mannay <audiobarrier_AT_openmailbox.org>
Date: Sun, 9 Oct 2016 23:13:13 +0000

---
 ed.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ed.c b/ed.c
index d123814..de5321f 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -809,9 +809,8 @@ join(void)
 	int i;
 	char *t, c;
 	size_t len = 0, cap = 0;
-	static char *s;
+	char *s;
 
-	free(s);
 	for (s = NULL, i = line1;; i = nextln(i)) {
 		for (t = gettxt(i); (c = *t) != '\n'; ++t)
 			s = addchar(*t, s, &cap, &len);
-- 
2.10.0
--Multipart=_Sun__9_Oct_2016_23_20_20_+0000_Tw0GY2bnCixoZsD5
Content-Type: text/x-patch;
 name="0005-ed-add-manpage.patch"
Content-Disposition: attachment;
 filename="0005-ed-add-manpage.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon Oct 10 2016 - 03:24:12 CEST