From b4f89f00c607689d867a83d9d52535f371c5d750 Mon Sep 17 00:00:00 2001
From: Nick Mathewson <nickm@torproject.org>
Date: Thu, 21 Apr 2011 17:33:13 -0400
Subject: [PATCH] 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.
---
 evmap.c | 1 +
 1 file changed, 1 insertion(+)

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
 
-- 
2.40.0