]> sigrok.org Git - libsigrokdecode.git/blobdiff - srd.c
srd_exit(): Fix a -Wcast-function-type compiler warning.
[libsigrokdecode.git] / srd.c
diff --git a/srd.c b/srd.c
index d4ec44beca2a4579d7f3e7054f9095093ce40dd3..5903c6d7e75b748149218ffa459323f5d8ae804b 100644 (file)
--- 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);