summaryrefslogtreecommitdiff
path: root/srd.c
diff options
context:
space:
mode:
Diffstat (limited to 'srd.c')
-rw-r--r--srd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/srd.c b/srd.c
index d4ec44b..5903c6d 100644
--- a/srd.c
+++ b/srd.c
@@ -307,7 +307,8 @@ SRD_API int srd_exit(void)
{
srd_dbg("Exiting libsigrokdecode.");
- g_slist_foreach(sessions, (GFunc)srd_session_destroy, NULL);
+ for (GSList *l = sessions; l; l = l->next)
+ srd_session_destroy(l->data);
srd_decoder_unload_all();
g_slist_free_full(searchpaths, g_free);