diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-25 18:58:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-25 18:58:26 +0400 |
commit | 28243b2e5fd272d12c4349c7998b39893c20628c (patch) | |
tree | f95a059a666491e27745b5e101195333663cfc08 /source/blender/blenlib/intern/BLI_ghash.c | |
parent | e4d278668fcea1a42e2b8bfd1f5a85be192d3b49 (diff) |
fix leak in BLI_ghash_clear(). was never freeing entries, add BLI_mempool_clear utility function.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_ghash.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_ghash.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 21326227794..ba492db4dbf 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -401,6 +401,8 @@ void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfree MEM_freeN(gh->buckets); gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets"); + + BLI_mempool_clear(gh->entrypool); } /** |