aboutsummaryrefslogtreecommitdiff
path: root/common/hashmap.h
diff options
context:
space:
mode:
authorEugene Sandulenko2006-06-02 17:57:45 +0000
committerEugene Sandulenko2006-06-02 17:57:45 +0000
commit061905c524a14398033d447423230df7a10b0be6 (patch)
tree294a45108525cbe8d7982e068c542a9e34fa5380 /common/hashmap.h
parent05871836b9cb9851a09cd98258f5cbc75f30344a (diff)
downloadscummvm-rg350-061905c524a14398033d447423230df7a10b0be6.tar.gz
scummvm-rg350-061905c524a14398033d447423230df7a10b0be6.tar.bz2
scummvm-rg350-061905c524a14398033d447423230df7a10b0be6.zip
Plug memory leak
svn-id: r22842
Diffstat (limited to 'common/hashmap.h')
-rw-r--r--common/hashmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index f4e115c7d2..2627babd0e 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -94,6 +94,7 @@ struct BaseNode<const char *, Val> {
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