X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Ftrigger.c;h=51d8368a11b3373110c758dc9a6b7f4864d04db3;hb=1e7468a8858768806a066f52d47d167a3721a8e4;hp=34474982b678de0bc5144a5553f7a0b51a3c65ed;hpb=c1aae90038456a61d0f9313d34e6107c3440d3e7;p=libsigrok.git diff --git a/src/trigger.c b/src/trigger.c index 34474982..51d8368a 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -17,13 +17,14 @@ * along with this program. If not, see . */ +#include #include #include "libsigrok-internal.h" -/* * @cond PRIVATE */ +/** @cond PRIVATE */ #define LOG_PREFIX "trigger" -/* * @endcond */ - +/** @endcond */ + /** * @file * @@ -80,7 +81,9 @@ SR_API void sr_trigger_free(struct sr_trigger *trig) for (l = trig->stages; l; l = l->next) { stage = l->data; - g_slist_free_full(stage->matches, g_free); + + if (stage->matches) + g_slist_free_full(stage->matches, g_free); } g_slist_free_full(trig->stages, g_free);