From 39461d75484ca1d45cd53c83af03692188c22efa Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 5 Jul 2018 00:08:55 +0100 Subject: [PATCH] dtcm: Coverity 89645 --- cde/programs/dtcm/dtcm/dtcm_editor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtcm/dtcm/dtcm_editor.c b/cde/programs/dtcm/dtcm/dtcm_editor.c index b0ee5542..8a6b3e08 100644 --- a/cde/programs/dtcm/dtcm/dtcm_editor.c +++ b/cde/programs/dtcm/dtcm/dtcm_editor.c @@ -343,6 +343,7 @@ StandaloneApptDragStart( int old_attr_count; char *apptstr; int preDsswFlags, preRfpFlags; + char *attrstring = NULL; /* Convert appointment into string. If not successful, don't start drag. */ appt = allocate_appt_struct(appt_write, DATAVER_ARCHIVE, NULL); @@ -368,8 +369,9 @@ StandaloneApptDragStart( old_attr_count = appt->count; merge_old_values(de->orig_appt, appt); - apptstr = parse_attrs_to_string(appt, de->p, - attrs_to_string(appt->attrs, appt->count)); + attrstring = attrs_to_string(appt->attrs, appt->count); + apptstr = parse_attrs_to_string(appt, de->p, attrstring); + free(attrstring); appt->count = old_attr_count; free_appt_struct(&appt); -- 2.25.1