mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
GNAP: Fix memory leaks, reported by Valgrind
This commit is contained in:
parent
0489a0d307
commit
4cac7d1511
@ -65,6 +65,9 @@ GameSys::GameSys(GnapEngine *vm) : _vm(vm) {
|
||||
}
|
||||
|
||||
GameSys::~GameSys() {
|
||||
if (_frontSurface)
|
||||
_frontSurface->free();
|
||||
delete _frontSurface;
|
||||
}
|
||||
|
||||
void GameSys::insertSequence(int sequenceId, int id, int sequenceId2, int id2, int flags, int totalDuration, int16 x, int16 y) {
|
||||
|
@ -157,6 +157,7 @@ Common::Error GnapEngine::run() {
|
||||
_font = Graphics::loadTTFFont(*stream, 24);
|
||||
if (!_font)
|
||||
warning("Unable to load font");
|
||||
delete stream;
|
||||
#else
|
||||
_font = nullptr;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user