[hackers] [sbase] ed: remove double free in join() || Thomas Mannay
commit 30da327fbd27eee508c5492a763ea19d7cd9e281
Author: Thomas Mannay <audiobarrier_AT_openmailbox.org>
AuthorDate: Sun Oct 9 23:13:13 2016 +0000
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Tue Dec 27 12:50:25 2016 +0100
ed: remove double free in join()
diff --git a/ed.c b/ed.c
index a9aacf1..17b925b 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);
Received on Tue Dec 27 2016 - 15:04:01 CET
This archive was generated by hypermail 2.3.0
: Tue Dec 27 2016 - 15:12:56 CET