From 3a4527980d325ecb74c4078835f29b7560bebe92 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 19:06:58 +0100 Subject: [PATCH] dtcm: Coverity 89313 --- cde/programs/dtcm/server/delete.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtcm/server/delete.c b/cde/programs/dtcm/server/delete.c index 31ee29e2..7e4d941c 100644 --- a/cde/programs/dtcm/server/delete.c +++ b/cde/programs/dtcm/server/delete.c @@ -351,7 +351,7 @@ static CSA_return_code _AddException(cms_attribute *attr, time_t time) { CSA_date_time_entry *dt, *dlist, *prev; - cms_attribute_value *val; + cms_attribute_value *val = NULL; time_t tick; char buf[20]; @@ -378,7 +378,7 @@ _AddException(cms_attribute *attr, time_t time) val->type = CSA_VALUE_DATE_TIME_LIST; } - if (attr->value->item.date_time_list_value == NULL) { + if (val && (attr->value->item.date_time_list_value == NULL)) { val->item.date_time_list_value = dt; } else { for (dlist = attr->value->item.date_time_list_value, prev=NULL; -- 2.25.1