From: Peter Howkins Date: Wed, 4 Jul 2018 18:43:09 +0000 (+0100) Subject: dtcm: Coverity 88468 X-Git-Tag: 2.3.0a~188 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d8358dcbcc82a3f781fd201958084c08ead8ec5b;p=oweals%2Fcde.git dtcm: Coverity 88468 --- diff --git a/cde/programs/dtcm/server/reminder.c b/cde/programs/dtcm/server/reminder.c index d1de38de..ac48232c 100644 --- a/cde/programs/dtcm/server/reminder.c +++ b/cde/programs/dtcm/server/reminder.c @@ -807,7 +807,7 @@ _UpdateReminderQ(_DtCmsRemQueue *remq, int qindex) _DtCmsRemInfo *rptr, *nptr; cms_entry *entry; time_t lead, tick; - RepeatEventState *restate; + RepeatEventState *restate = NULL; for (; (rptr = remq->active[qindex]) != NULL && rptr->runtime < remq->cutoff; ) { @@ -824,6 +824,8 @@ _UpdateReminderQ(_DtCmsRemQueue *remq, int qindex) tick = ClosestTick(entry->key.time, entry->key.time, rptr->lnode->re, &restate); + free(restate); + if (tick == rptr->starttime) { /* add this to old queue */ _InsertReminder(&remq->oldhead[qindex], rptr);