dtcm: Coverity 88514
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:07:44 +0000 (22:07 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:07:44 +0000 (22:07 +0100)
cde/programs/dtcm/dtcm/dnd.c

index 8c71090f1177b7a4a619f43585c17a15e3d6918b..1c1687161b72793d36c15f801d0f19450f25b5cb 100644 (file)
@@ -924,9 +924,14 @@ ApptDragStart(
          free(context);
          return;
        }
-       apptstr = parse_attrs_to_string(appt, (Props *)calendar->properties, 
-                                       attrs_to_string(appt->attrs,
-                                                       appt->count));
+
+       {
+               char *attr_string = attrs_to_string(appt->attrs, appt->count);
+               apptstr = parse_attrs_to_string(appt, (Props *)calendar->properties,
+                                       attr_string);
+
+               free(attr_string);
+       }
        free_appt_struct(&appt);
 
        context->data = apptstr;