dtfile/Help.c: coverity CID 88484; use after free
This commit is contained in:
@@ -473,7 +473,7 @@ MapFileTypeToHelpString(
|
|||||||
char * desc;
|
char * desc;
|
||||||
Boolean isAction;
|
Boolean isAction;
|
||||||
char * tmpStr;
|
char * tmpStr;
|
||||||
char * label;
|
char * label = NULL;
|
||||||
|
|
||||||
/* Special case for the 2 built in directory commands */
|
/* Special case for the 2 built in directory commands */
|
||||||
if (strcmp(filetype, openNewView) == 0)
|
if (strcmp(filetype, openNewView) == 0)
|
||||||
@@ -536,6 +536,7 @@ MapFileTypeToHelpString(
|
|||||||
buf = XtMalloc(strlen(label) + strlen(helpPattern) + 100);
|
buf = XtMalloc(strlen(label) + strlen(helpPattern) + 100);
|
||||||
sprintf(buf, helpPattern, label);
|
sprintf(buf, helpPattern, label);
|
||||||
DtDtsFreeAttributeValue(label);
|
DtDtsFreeAttributeValue(label);
|
||||||
|
label = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user