diff options
author | Einar Johan Trøan Sømåen | 2012-07-30 19:43:55 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-30 19:43:55 +0200 |
commit | 18409fe5c03264ca74902e263f80523692f76a77 (patch) | |
tree | 172cf237d1ba950b5a5af5066243fc02b706bb0c /engines/wintermute/base | |
parent | 43611724441e880b7283ae195d40f5e63aa6affd (diff) | |
download | scummvm-rg350-18409fe5c03264ca74902e263f80523692f76a77.tar.gz scummvm-rg350-18409fe5c03264ca74902e263f80523692f76a77.tar.bz2 scummvm-rg350-18409fe5c03264ca74902e263f80523692f76a77.zip |
WINTERMUTE: Fix a memory leak in BaseScriptHolder
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_script_holder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp index 19bd82f2b0..b40647dc7b 100644 --- a/engines/wintermute/base/base_script_holder.cpp +++ b/engines/wintermute/base/base_script_holder.cpp @@ -287,9 +287,10 @@ bool BaseScriptHolder::persist(BasePersistenceManager *persistMgr) { const char *name = getName();
persistMgr->transfer(TMEMBER(name));
} else {
- const char *name;
+ char *name;
persistMgr->transfer(TMEMBER(name));
setName(name);
+ delete[] name;
}
_scripts.persist(persistMgr);
|