From: Peter Howkins Date: Fri, 13 Jul 2018 18:06:58 +0000 (+0100) Subject: dtcm: Coverity 89313 X-Git-Tag: 2.3.0a~69 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3a4527980d325ecb74c4078835f29b7560bebe92;p=oweals%2Fcde.git dtcm: Coverity 89313 --- 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;