dtcm: Coverity 89212, 88188 and 88636
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:11:44 +0000 (22:11 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:11:44 +0000 (22:11 +0100)
cde/programs/dtcm/libDtCmP/cm_tty.c

index 9d574571302abe562832c31181a22cca2a9a1772..e7897bca1694008b38128514511978f88936257d 100644 (file)
@@ -1213,12 +1213,13 @@ read_new_appt(FILE *fp, Dtcm_appointment **appt, Props *p, int version)
                                          a_name, a_tag, a_value);
                        ++attrs_written;
                }
-
-               free(a_name);
-               free(a_tag);
-               free(a_value);
        }
 
+       free(a_name);
+       free(a_tag);
+       free(a_value);
+
+
        avlist->count = attrs_written;
        set_appt_links(avlist);
        *appt = avlist;