dtfile/Help: CID 88598
authorJon Trulson <jon@radscan.com>
Wed, 11 Apr 2018 20:46:57 +0000 (14:46 -0600)
committerJon Trulson <jon@radscan.com>
Wed, 11 Apr 2018 22:25:52 +0000 (16:25 -0600)
cde/programs/dtfile/Help.c

index 774cad57e3cdf3ca39c1aacc340b23ec773c0791..fb1ea371acd4f425ec211fc4083675e6499166f1 100644 (file)
@@ -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)