From caee0e9cb5ed483081f536a57acb5f8532054f58 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 5 Jul 2018 00:00:57 +0100 Subject: [PATCH] dtcm: Coverity 89502 --- cde/programs/dtcm/dtcm/blist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cde/programs/dtcm/dtcm/blist.c b/cde/programs/dtcm/dtcm/blist.c index aee694e4..98139a73 100644 --- a/cde/programs/dtcm/dtcm/blist.c +++ b/cde/programs/dtcm/dtcm/blist.c @@ -453,8 +453,14 @@ blist_init_names(Calendar *c) { blist_name_append(c, get_char_prop(p, CP_DEFAULTCAL), BLIST_ACTIVE); namelist = cm_strdup(get_char_prop(p, CP_DAYCALLIST)); - if (namelist == NULL || *namelist == '\0' ) + if(namelist == NULL) { return; + } + + if(*namelist == '\0') { + free(namelist); + return; + } name = strtok(namelist, " "); while (name) { -- 2.25.1