From 3c056ef018958dfe8fce96368b7df1506507f523 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 4 Jul 2018 22:07:44 +0100 Subject: [PATCH] dtcm: Coverity 88514 --- cde/programs/dtcm/dtcm/dnd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cde/programs/dtcm/dtcm/dnd.c b/cde/programs/dtcm/dtcm/dnd.c index 8c71090f..1c168716 100644 --- a/cde/programs/dtcm/dtcm/dnd.c +++ b/cde/programs/dtcm/dtcm/dnd.c @@ -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; -- 2.25.1