]> sigrok.org Git - libsigrok.git/commitdiff
session: Free session-wide trigger if set.
authorBert Vermeulen <redacted>
Wed, 28 May 2014 13:46:43 +0000 (15:46 +0200)
committerBert Vermeulen <redacted>
Wed, 28 May 2014 13:46:43 +0000 (15:46 +0200)
session.c

index 742619a684272115729d428679794ce7b62c672c..86d641efee9a8b92431b580e505d08aecd583662 100644 (file)
--- a/session.c
+++ b/session.c
@@ -106,10 +106,9 @@ SR_API int sr_session_destroy(void)
        }
 
        sr_session_dev_remove_all();
-
-       /* TODO: Error checks needed? */
-
        g_mutex_clear(&session->stop_mutex);
+       if (session->trigger)
+               sr_trigger_free(session->trigger);
 
        g_free(session);
        session = NULL;