dtfile/SharedProcs.c: coverity CID 89068; use after free
This commit is contained in:
@@ -787,9 +787,10 @@ _DtCheckAndFreePixmapData(
|
|||||||
XtFree( tmp );
|
XtFree( tmp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DtDtsFreeAttributeValue(pixmapData->instanceIconName);
|
DtDtsFreeAttributeValue(pixmapData->instanceIconName);
|
||||||
|
pixmapData->instanceIconName = NULL;
|
||||||
|
|
||||||
if (iconGadget->icon.pixmap == 0 ||
|
if (iconGadget->icon.pixmap == 0 ||
|
||||||
iconGadget->icon.pixmap_width == 0 ||
|
iconGadget->icon.pixmap_width == 0 ||
|
||||||
@@ -824,15 +825,17 @@ _DtCheckAndFreePixmapData(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
XtSetArg(args[0], XmNimageName, pixmapData->iconFileName);
|
XtSetArg(args[0], XmNimageName, pixmapData->iconFileName);
|
||||||
XtSetValues((Widget) iconGadget, args, 1);
|
XtSetValues((Widget) iconGadget, args, 1);
|
||||||
|
|
||||||
DtDtsFreeAttributeValue(pixmapData->iconName);
|
DtDtsFreeAttributeValue(pixmapData->iconName);
|
||||||
|
pixmapData->iconName = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DtDtsFreeAttributeValue(pixmapData->iconName);
|
DtDtsFreeAttributeValue(pixmapData->iconName);
|
||||||
|
pixmapData->iconName = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DtDtsFreeAttributeValue(pixmapData->hostPrefix);
|
DtDtsFreeAttributeValue(pixmapData->hostPrefix);
|
||||||
|
|||||||
Reference in New Issue
Block a user