ResMain.c: use-after-free: simple reorder of statements

This commit is contained in:
Darryl L. Miles 2025-02-13 08:13:39 +00:00 committed by Tim Edwards
parent 48708c52a4
commit 92c4fc35db
1 changed files with 1 additions and 1 deletions

View File

@ -1087,11 +1087,11 @@ ResExtractNet(node, goodies, cellname)
resMakeDevFunc, (ClientData)thisDev);
if (result == 0)
{
freeMagic(thisDev);
TxError("No device of type %s found at location %d,%d\n",
DBTypeLongNameTbl[thisDev->type],
tptr->thisDev->location.p_x,
tptr->thisDev->location.p_y);
freeMagic(thisDev);
continue;
}
thisDev->nextDev = DevTiles;