diff options
author | Nipun Garg | 2019-07-18 18:40:05 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:23 +0200 |
commit | 8d9004e43268109394059ff267cce9983c4f5346 (patch) | |
tree | 4a8cdd459be080f966283cad4205b05e3a60402d /engines/hdb/map.cpp | |
parent | ea77240d4e85873fd5f006b10981509156ddba73 (diff) | |
download | scummvm-rg350-8d9004e43268109394059ff267cce9983c4f5346.tar.gz scummvm-rg350-8d9004e43268109394059ff267cce9983c4f5346.tar.bz2 scummvm-rg350-8d9004e43268109394059ff267cce9983c4f5346.zip |
HDB: Fix memory leaks when stream is returned NULL
Diffstat (limited to 'engines/hdb/map.cpp')
-rw-r--r-- | engines/hdb/map.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index 450f182927..e1d21c4f0c 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -260,6 +260,7 @@ bool Map::loadMap(char *name) { Common::SeekableReadStream *mapStream = g_hdb->_fileMan->findFirstData(name, TYPE_BINARY); if (mapStream == NULL) { warning("The %s MPC entry can't be found", name); + delete mapStream; return false; } |