circo

claudio's IRC oasis
git clone git://git.bitsmanent.org/circo
Log | Files | Refs | README | LICENSE

commit 3602c4a72178aa37b949535a738a7157249e5282
parent c31a0c519ec6c8651f43ac7df2a8bcee5c1ebce9
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 31 Jul 2017 11:08:17 +0200

Fix pointer handling in cleanup().

There's no need to call detach() since we're already detaching with the
statement buffers = buffers->next. Indeed, this segfaults on exit with more
than one buffers.

Diffstat:
Mcirco.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/circo.c b/circo.c @@ -222,10 +222,8 @@ void cleanup(void) { Buffer *b; - while(buffers) { - b = buffers; + while((b = buffers)) { buffers = buffers->next; - detach(b); freebuf(b); } tcsetattr(0, TCSANOW, &origti);