From: Aleksander Alekseev Date: Wed, 2 May 2018 12:30:41 +0000 (+0300) Subject: Minor fix that makes Clang Static Analyzer stop complaining X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=commitdiff_plain;h=690617b83aad8841accfe7bf4d4044efa3bd2655 Minor fix that makes Clang Static Analyzer stop complaining --- diff --git a/session.c b/session.c index 4a3878a..60f253f 100644 --- a/session.c +++ b/session.c @@ -577,6 +577,12 @@ void run_session(void) } } + /* This is unlikely to happen but it makes static analyzers stop complaining. */ + if (!devices) { + g_critical("No real devices found."); + return; + } + sdi = devices->data; g_slist_free(devices); g_slist_free(real_devices);