From: Jon Trulson Date: Sun, 1 Apr 2018 00:11:14 +0000 (-0600) Subject: dtfile/Help.c: coverity CID 88484; use after free X-Git-Tag: 2.2.4a~158 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ec93faffe70c86ed6944d17cdc1d790defd51df1;p=oweals%2Fcde.git dtfile/Help.c: coverity CID 88484; use after free --- 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 {