Skip to content

Commit

Permalink
Avoid crash when freeing event_iocp and using event_set_mem_functions
Browse files Browse the repository at this point in the history
There was a calloc that needed to be an mm_calloc.

Reported by "fffvvvzz" on sourceforge.  Ticket 3486114
  • Loading branch information
nmathewson committed Feb 9, 2012
1 parent 6f6cebe commit 19715a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event_iocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 19715a6

Please sign in to comment.