X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=srd.c;h=5903c6d7e75b748149218ffa459323f5d8ae804b;hp=d4ec44beca2a4579d7f3e7054f9095093ce40dd3;hb=ca4a1d1d2ea358f55758643c92c8b6ada02598a9;hpb=4fde4be1e61ed706e300d3cb24264249b1aef825 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);