From d8358dcbcc82a3f781fd201958084c08ead8ec5b Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 4 Jul 2018 19:43:09 +0100 Subject: [PATCH] dtcm: Coverity 88468 --- cde/programs/dtcm/server/reminder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.25.1