1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtfile/SharedProcs.c: coverity CID 89068; use after free

This commit is contained in:
Jon Trulson 2018-03-31 17:21:34 -06:00
parent 0c0b77a509
commit c32b5db653

View file

@ -787,9 +787,10 @@ _DtCheckAndFreePixmapData(
XtFree( tmp );
}
DtDtsFreeAttributeValue(pixmapData->instanceIconName);
pixmapData->instanceIconName = NULL;
if (iconGadget->icon.pixmap == 0 ||
iconGadget->icon.pixmap_width == 0 ||
@ -824,15 +825,17 @@ _DtCheckAndFreePixmapData(
XtSetArg(args[0], XmNimageName, pixmapData->iconFileName);
XtSetValues((Widget) iconGadget, args, 1);
XtSetArg(args[0], XmNimageName, pixmapData->iconFileName);
XtSetValues((Widget) iconGadget, args, 1);
DtDtsFreeAttributeValue(pixmapData->iconName);
DtDtsFreeAttributeValue(pixmapData->iconName);
pixmapData->iconName = NULL;
}
}
else
{
DtDtsFreeAttributeValue(pixmapData->iconName);
pixmapData->iconName = NULL;
}
DtDtsFreeAttributeValue(pixmapData->hostPrefix);