[vte] [ring] Fix chunk disposal



commit 9ba03097d00059dd5d833053b5cf7f06e22a8f1f
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Sep 8 02:10:07 2009 -0400

    [ring] Fix chunk disposal

 src/ring.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index dab2ca8..8f1d169 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -785,8 +785,12 @@ _vte_ring_fini (VteRing *ring)
 
 	_vte_row_data_fini (&ring->cached_row);
 
-	for (chunk = ring->head->prev_chunk; chunk; chunk = chunk->prev_chunk)
+	chunk = ring->head->prev_chunk;
+	while (chunk) {
+		VteRingChunk *prev_chunk = chunk->prev_chunk;
 		_vte_ring_chunk_free_compact (chunk);
+		chunk = prev_chunk;
+	}
 
 	_vte_ring_chunk_fini_writable (ring->head);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]