X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=srd.c;h=a6c16f69a800742621a4137635ac34354ddbe6c9;hp=1c7f6f92e59fcb895940a8225477bd50047a9ac9;hb=4dc2a249c9691da9981c849270267a3dc1096700;hpb=e195c025c303e361d0cc5a207f9c9443fb8deced diff --git a/srd.c b/srd.c index 1c7f6f9..a6c16f6 100644 --- a/srd.c +++ b/srd.c @@ -25,6 +25,9 @@ /** @cond PRIVATE */ +/* Python module search paths */ +SRD_PRIV GSList *searchpaths = NULL; + /* session.c */ extern GSList *sessions; extern int max_session_id; @@ -194,8 +197,8 @@ SRD_API int srd_exit(void) srd_session_destroy((struct srd_session *)l->data); srd_decoder_unload_all(); - g_slist_free(pd_list); - pd_list = NULL; + g_slist_free_full(searchpaths, g_free); + searchpaths = NULL; /* Py_Finalize() returns void, any finalization errors are ignored. */ Py_Finalize(); @@ -259,6 +262,7 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path) PySys_SetPath(wc_new_path); g_string_free(new_path, TRUE); g_free(wc_new_path); + searchpaths = g_slist_append(searchpaths, g_strdup(path)); return SRD_OK; }