From: Jon Trulson Date: Wed, 11 Apr 2018 20:46:57 +0000 (-0600) Subject: dtfile/Help: CID 88598 X-Git-Tag: 2.2.4a~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54f8982c61ea8c35bb0aabb6e93d320e4ad64b01;p=oweals%2Fcde.git dtfile/Help: CID 88598 --- diff --git a/cde/programs/dtfile/Help.c b/cde/programs/dtfile/Help.c index 774cad57..fb1ea371 100644 --- a/cde/programs/dtfile/Help.c +++ b/cde/programs/dtfile/Help.c @@ -498,22 +498,21 @@ MapFileTypeToHelpString( return(buf); } -#ifdef old - if (miscData) - /* The DtGetActionDescription function must be modified to - accept a non-integral second parameter. (Filetypes are no - longer expressed as integers. */ - desc = DtGetActionDescription(filetype, -1); - else -#endif - desc = DtDtsDataTypeToAttributeValue(filetype, - DtDTS_DA_DESCRIPTION, - NULL); + desc = DtDtsDataTypeToAttributeValue(filetype, + DtDTS_DA_DESCRIPTION, + NULL); isAction = DtDtsDataTypeIsAction(filetype); if (desc) - return(XtNewString(desc)); + { + char *descptr = XtNewString(desc); + XtFree((char *)desc); + if (descptr) + return descptr; + else + return NULL; + } /* No description found for this filetype */ if (isAction)