diff --git a/src/libs/tgfdata/drivers.cpp b/src/libs/tgfdata/drivers.cpp index 726062fd4..3c64c4f72 100644 --- a/src/libs/tgfdata/drivers.cpp +++ b/src/libs/tgfdata/drivers.cpp @@ -646,6 +646,8 @@ void GfDriver::getPossibleSkinsInFolder(const std::string& strCarId, while (pCurIntFile != pIntFileList); } + GfDirFreeList(pIntFileList, NULL); + // Search for skinned logo files if any. tFList *pLogoFileList = GfDirGetListFiltered(strFolderPath.c_str(), pszLogoTexName, pszLogoTexExt); diff --git a/src/libs/tgfdata/tracks.cpp b/src/libs/tgfdata/tracks.cpp index 53e2ab51a..ae1dfdbdc 100755 --- a/src/libs/tgfdata/tracks.cpp +++ b/src/libs/tgfdata/tracks.cpp @@ -160,6 +160,8 @@ GfTracks::GfTracks() _pPrivate->mapTracksById[pszTrackId] = pTrack; } while ((pTrackFolder = pTrackFolder->next) != lstTrackFolders); + + GfDirFreeList(lstTrackFolders, NULL, true, true); } while ((pCatFolder = pCatFolder->next) != lstCatFolders);