X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=srd.c;h=eb29f61599ce09ecd90f9174ee3051df3d9eae32;hp=d4ec44beca2a4579d7f3e7054f9095093ce40dd3;hb=43dc03965ffa8967884cf320660b0934463f3739;hpb=4fde4be1e61ed706e300d3cb24264249b1aef825 diff --git a/srd.c b/srd.c index d4ec44b..eb29f61 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); @@ -395,7 +396,12 @@ err: */ SRD_API GSList *srd_searchpaths_get(void) { - return g_slist_copy_deep(searchpaths, (GCopyFunc)g_strdup, NULL); + GSList *paths = NULL; + + for (GSList *l = searchpaths; l; l = l->next) + paths = g_slist_append(paths, g_strdup(l->data)); + + return paths; } /** @} */