Fixed a rather large memory leak.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5102 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-01 20:49:59 +00:00
parent edca940a86
commit 67692e51f1
3 changed files with 45 additions and 4 deletions

View File

@@ -105,14 +105,17 @@ void FreeObjData (ObjData* O)
/* Unused ObjData do only have the string pool, Exports and Imports. */
for (I = 0; I < CollCount (&O->Exports); ++I) {
FreeExport (CollAt (&O->Exports, I));
FreeExport (CollAtUnchecked (&O->Exports, I));
}
DoneCollection (&O->Exports);
for (I = 0; I < CollCount (&O->Imports); ++I) {
FreeImport (CollAt (&O->Imports, I));
FreeImport (CollAtUnchecked (&O->Imports, I));
}
DoneCollection (&O->Imports);
DoneCollection (&O->DbgSyms);
for (I = 0; I < CollCount (&O->LineInfos); ++I) {
FreeLineInfo (CollAtUnchecked (&O->LineInfos, I));
}
DoneCollection (&O->LineInfos);
xfree (O->Strings);
DoneCollection (&O->Assertions);