dtcm: Coverity 88687
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:16:48 +0000 (22:16 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:16:48 +0000 (22:16 +0100)
cde/programs/dtcm/dtcm/format.c

index 47456765641abfe090625e91580da44462364a36..6c7c3f2dd30a239775f14713b1fe10ebe977b692 100644 (file)
@@ -420,6 +420,9 @@ format_abbrev_appt(Dtcm_appointment *appt, char *b, Boolean show_am,
         lines = text_to_lines(appt->what->value->item.string_value, 1);
         if (lines != NULL && lines->s != NULL) {
                 (void) cm_strcat(b, lines->s);
+        }
+
+        if(lines != NULL) {
                 destroy_lines(lines);
         }
 }