dtcm: Coverity 88636
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:40:04 +0000 (16:40 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:40:04 +0000 (16:40 +0100)
cde/programs/dtcm/libDtCmP/cm_tty.c

index ec8247bfabd903afcfee0ad13e7b1f8c6fb951b6..baa3ceb1164326f659726fb84ffb82c9a733b68f 100644 (file)
@@ -1148,12 +1148,12 @@ 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);
+
                /* this should pull off the new attribute name */
 
                a_name = a_tag = a_value = NULL;