From: Peter Howkins Date: Wed, 4 Jul 2018 22:36:46 +0000 (+0100) Subject: dtcm: Coverity 88214 X-Git-Tag: 2.3.0a~166 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70e5a9f044e0f1afa67969ac8b4fb4250d840812;p=oweals%2Fcde.git dtcm: Coverity 88214 --- diff --git a/cde/programs/dtcm/dtcm/dtcm_editor.c b/cde/programs/dtcm/dtcm/dtcm_editor.c index dcaf43cb..b0ee5542 100644 --- a/cde/programs/dtcm/dtcm/dtcm_editor.c +++ b/cde/programs/dtcm/dtcm/dtcm_editor.c @@ -564,6 +564,7 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) { Dtcm_appointment *appt; int old_attr_count; Display *dpy = XtDisplayOfObject(w); + char *attrstring = NULL; appt = allocate_appt_struct(appt_write, DATAVER_ARCHIVE, @@ -580,7 +581,9 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) { old_attr_count = appt->count; merge_old_values(de->orig_appt, appt); - str = parse_attrs_to_string(appt, de->p, attrs_to_string(appt->attrs, appt->count)); + attrstring = attrs_to_string(appt->attrs, appt->count); + str = parse_attrs_to_string(appt, de->p, attrstring); + free(attrstring); appt->count = old_attr_count; de->modified = False;