summaryrefslogtreecommitdiff
path: root/evmap.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-04-21 17:33:13 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-21 17:33:13 -0400
commitb4f89f00c607689d867a83d9d52535f371c5d750 (patch)
treec116d131214974c54680758d698b04d3f7e569d8 /evmap.c
parent364291e9a9a4abe5c7612f587b82a601e07af942 (diff)
downloadlibevent-b4f89f00c607689d867a83d9d52535f371c5d750.tar.gz
Fix a memory leak on win32 socket->event map.
This would lose some memory every time an event_base was freed on win32. Found by Dimitre Piskyulev.
Diffstat (limited to 'evmap.c')
-rw-r--r--evmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/evmap.c b/evmap.c
index 5521626c..5167d7ab 100644
--- a/evmap.c
+++ b/evmap.c
@@ -148,6 +148,7 @@ void evmap_io_clear(struct event_io_map *ctx)
next = HT_NEXT_RMV(event_io_map, ctx, ent);
mm_free(this);
}
+ HT_CLEAR(event_io_map, ctx); /* remove all storage held by the ctx. */
}
#endif