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
This commit is contained in:
Nick Mathewson 2012-02-09 15:07:19 -05:00
parent 6f6cebe356
commit 19715a60e2

View File

@ -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;