From 19715a60e28ec2490bbdb45ab36921f5a47fc74d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 9 Feb 2012 15:07:19 -0500 Subject: [PATCH] Avoid crash when freeing event_iocp and using event_set_mem_functions There was a calloc that needed to be an mm_calloc. Reported by "fffvvvzz" on sourceforge. Ticket 3486114 --- event_iocp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event_iocp.c b/event_iocp.c index de6b70b1b7..12994222b4 100644 --- a/event_iocp.c +++ b/event_iocp.c @@ -183,7 +183,7 @@ event_iocp_port_launch(int n_cpus) if (n_cpus <= 0) n_cpus = N_CPUS_DEFAULT; port->n_threads = n_cpus * 2; - port->threads = calloc(port->n_threads, sizeof(HANDLE)); + port->threads = mm_calloc(port->n_threads, sizeof(HANDLE)); if (!port->threads) goto err;