diff options
author | Torbjörn Andersson | 2013-06-02 22:00:25 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2013-06-02 22:00:25 +0200 |
commit | 9d28a6f531ad3727675604e24cdeff5ce03decc3 (patch) | |
tree | 34e2dc848659581f7bd962fc7379f370fc7137bb /engines/tony | |
parent | 52be12830b7fdce9c0d632d3a292cd7cc6d98d1d (diff) | |
download | scummvm-rg350-9d28a6f531ad3727675604e24cdeff5ce03decc3.tar.gz scummvm-rg350-9d28a6f531ad3727675604e24cdeff5ce03decc3.tar.bz2 scummvm-rg350-9d28a6f531ad3727675604e24cdeff5ce03decc3.zip |
TONY: Fix potential memory leak
Unfortunately, I'm not sure where and when this function is called.
But this should be correct. CID 1003575
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/mpal/mpal.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 1a24c5a576..1de5c6850c 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -521,14 +521,15 @@ static LpItem getItemData(uint32 nOrdItem) { dat += dim; } - // Check if we've got to the end of the file int i = READ_LE_UINT16(dat); - if (i != 0xABCD) - return NULL; globalUnlock(hDat); globalFree(hDat); + // Check if we've got to the end of the file + if (i != 0xABCD) + return NULL; + return ret; } |