From ec93faffe70c86ed6944d17cdc1d790defd51df1 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 31 Mar 2018 18:11:14 -0600 Subject: [PATCH] dtfile/Help.c: coverity CID 88484; use after free --- cde/programs/dtfile/Help.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cde/programs/dtfile/Help.c b/cde/programs/dtfile/Help.c index 16ec31d6..774cad57 100644 --- a/cde/programs/dtfile/Help.c +++ b/cde/programs/dtfile/Help.c @@ -473,7 +473,7 @@ MapFileTypeToHelpString( char * desc; Boolean isAction; char * tmpStr; - char * label; + char * label = NULL; /* Special case for the 2 built in directory commands */ if (strcmp(filetype, openNewView) == 0) @@ -536,6 +536,7 @@ MapFileTypeToHelpString( buf = XtMalloc(strlen(label) + strlen(helpPattern) + 100); sprintf(buf, helpPattern, label); DtDtsFreeAttributeValue(label); + label = NULL; } else { -- 2.25.1