From: Peter Howkins Date: Wed, 4 Jul 2018 02:59:42 +0000 (+0100) Subject: dtcm: Coverity 88353 X-Git-Tag: 2.3.0a~191 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=408d18b711cb2c904817d5c5bb85abd3e861612c;p=oweals%2Fcde.git dtcm: Coverity 88353 --- diff --git a/cde/programs/dtcm/server/delete.c b/cde/programs/dtcm/server/delete.c index bafeeca2..83e67e40 100644 --- a/cde/programs/dtcm/server/delete.c +++ b/cde/programs/dtcm/server/delete.c @@ -327,7 +327,7 @@ _InSequence(List_node *node, time_t time) { time_t tick; cms_entry *entry = (cms_entry *)node->data; - RepeatEventState *restate; + RepeatEventState *restate = NULL; for (tick = ClosestTick(time, entry->key.time, node->re, &restate); tick <= node->lasttick; @@ -336,10 +336,14 @@ _InSequence(List_node *node, time_t time) if (tick <= 0 || tick > node->lasttick) break; - if (tick == time) + if (tick == time) { + free(restate); return (B_TRUE); + } } + free(restate); + return (B_FALSE); }