[Scummvm-cvs-logs] SF.net SVN: scummvm:[50351] scummvm/trunk/engines/sci/engine/segment.h
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jun 27 00:48:47 CEST 2010
Revision: 50351
http://scummvm.svn.sourceforge.net/scummvm/?rev=50351&view=rev
Author: thebluegr
Date: 2010-06-26 22:48:47 +0000 (Sat, 26 Jun 2010)
Log Message:
-----------
Zero out the memory pointer of a hunk when freeing it
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/segment.h
Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h 2010-06-26 22:45:53 UTC (rev 50350)
+++ scummvm/trunk/engines/sci/engine/segment.h 2010-06-26 22:48:47 UTC (rev 50351)
@@ -669,7 +669,10 @@
virtual void freeEntry(int idx) {
Table<Hunk>::freeEntry(idx);
+ if (!_table[idx].mem)
+ warning("Attempt to free an already freed hunk");
free(_table[idx].mem);
+ _table[idx].mem = 0;
}
virtual void saveLoadWithSerializer(Common::Serializer &ser);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list