From: John Ernberg <john.ernb...@actia.se>

---
 src/simfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/simfs.c b/src/simfs.c
index 03c8c9e..595dbad 100644
--- a/src/simfs.c
+++ b/src/simfs.c
@@ -74,8 +74,9 @@ struct sim_fs_op {
        struct ofono_sim_context *context;
 };
 
-static void sim_fs_op_free(struct sim_fs_op *node)
+static void sim_fs_op_free(gpointer pointer)
 {
+       struct sim_fs_op *node = pointer;
        g_free(node->buffer);
        g_free(node);
 }
@@ -105,8 +106,7 @@ void sim_fs_free(struct sim_fs *fs)
         * for operations still in progress
         */
        if (fs->op_q) {
-               g_queue_foreach(fs->op_q, (GFunc) sim_fs_op_free, NULL);
-               g_queue_free(fs->op_q);
+               g_queue_free_full(fs->op_q, sim_fs_op_free);
                fs->op_q = NULL;
        }
 
-- 
1.9.1
_______________________________________________
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to