[beast: 4/8] SFI: fix sfi_ring_free_deep() leaking every second node



commit 1d92cccefd5662dced7c58a6ec04b59f0c048528
Author: Tim Janik <timj gnu org>
Date:   Thu Sep 17 17:32:25 2015 +0200

    SFI: fix sfi_ring_free_deep() leaking every second node

 sfi/sfiring.cc |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/sfi/sfiring.cc b/sfi/sfiring.cc
index b45d84b..8cc8737 100644
--- a/sfi/sfiring.cc
+++ b/sfi/sfiring.cc
@@ -404,14 +404,12 @@ sfi_ring_nth_data (const SfiRing *head,
 }
 
 void
-sfi_ring_free_deep (SfiRing        *head,
-                    GDestroyNotify  data_destroy)
+sfi_ring_free_deep (SfiRing *head, GDestroyNotify data_destroy)
 {
   while (head)
     {
       gpointer data = sfi_ring_pop_head (&head);
       data_destroy (data);
-      data = sfi_ring_pop_head (&head);
     }
 }
 


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