1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0027410: Data Exchange, Iges Import - Possible resource leak when parsing an invalid file

fclose() call is added before early return statement in igesread() function.
This commit is contained in:
dkulikov 2024-09-25 08:57:29 +00:00 committed by dpasukhi
parent 5c454ed695
commit 071f14697f

View File

@ -78,8 +78,12 @@ int igesread (char* nomfic, int lesect[6], int modefnes)
str[0] = sects[i0]; str[0] = sects[i0];
IGESFile_Check2 (0,"XSTEP_18",numl,str); /* //gka 15 Sep 98: str instead of sects[i0]); */ IGESFile_Check2 (0,"XSTEP_18",numl,str); /* //gka 15 Sep 98: str instead of sects[i0]); */
} }
if (i0 == 0) return -1; if (i0 == 0)
{
fclose(lefic);
return -1;
}
lesect[i0] ++; lesect[i0] ++;
continue; continue;
} }