Clear decoder list after unloading, not just at exit.
authorBert Vermeulen <bert@biot.com>
Wed, 11 Dec 2013 15:30:25 +0000 (16:30 +0100)
committerBert Vermeulen <bert@biot.com>
Wed, 11 Dec 2013 15:30:25 +0000 (16:30 +0100)
decoder.c
srd.c

index af988cb8b3cf93708bc26a299c22f1bb85a22dfd..71f479902eb29545b94eb6b98e50bf6df52adfdb 100644 (file)
--- a/decoder.c
+++ b/decoder.c
@@ -601,6 +601,8 @@ SRD_API int srd_decoder_unload_all(void)
                dec = l->data;
                srd_decoder_unload(dec);
        }
+       g_slist_free(pd_list);
+       pd_list = NULL;
 
        return SRD_OK;
 }
diff --git a/srd.c b/srd.c
index 1c7f6f92e59fcb895940a8225477bd50047a9ac9..76e1b348fd62e403cf660c35c6f3b13aad93e27c 100644 (file)
--- a/srd.c
+++ b/srd.c
@@ -194,8 +194,6 @@ 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;
 
        /* Py_Finalize() returns void, any finalization errors are ignored. */
        Py_Finalize();