[ovs-dev] [PATCH] shash: Fix memory leak in shash_destroy().

Ben Pfaff blp at nicira.com
Thu Sep 24 17:23:39 UTC 2009


hmap_destroy() has to be called so that sh->map.buckets gets freed.
---
 lib/shash.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/shash.c b/lib/shash.c
index 9ddafe0..520e189 100644
--- a/lib/shash.c
+++ b/lib/shash.c
@@ -36,6 +36,7 @@ shash_destroy(struct shash *sh)
 {
     if (sh) {
         shash_clear(sh);
+        hmap_destroy(&sh->map);
     }
 }
 
-- 
1.6.3.3





More information about the dev mailing list