[Scummvm-cvs-logs] SF.net SVN: scummvm: [22842] scummvm/trunk/common/hashmap.h

sev at users.sourceforge.net sev at users.sourceforge.net
Fri Jun 2 19:57:59 CEST 2006


Revision: 22842
Author:   sev
Date:     2006-06-02 10:57:45 -0700 (Fri, 02 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22842&view=rev

Log Message:
-----------
Plug memory leak

Modified Paths:
--------------
    scummvm/trunk/common/hashmap.h
Modified: scummvm/trunk/common/hashmap.h
===================================================================
--- scummvm/trunk/common/hashmap.h	2006-06-02 17:51:20 UTC (rev 22841)
+++ scummvm/trunk/common/hashmap.h	2006-06-02 17:57:45 UTC (rev 22842)
@@ -94,6 +94,7 @@
 	Val _value;
 	BaseNode() {assert(0);}
 	BaseNode(const char *key) { _key = (char *)malloc(strlen(key)+1); strcpy(_key, key); }
+	~BaseNode() { free(_key); }
 };
 
 // The table sizes ideally are primes. We use a helper function to find


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