From: Nick Mathewson Date: Thu, 21 Apr 2011 21:33:13 +0000 (-0400) Subject: Fix a memory leak on win32 socket->event map. X-Git-Tag: release-2.0.11-stable~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4f89f00c607689d867a83d9d52535f371c5d750;p=libevent 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. --- 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