diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-14 13:29:05 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-09-15 11:40:59 -0400 |
commit | 84d18f70f3400df3e9c3b3c47288e82cd9160f6e (patch) | |
tree | f2d971318be1bfda32f84a04edcef472bae94892 /src | |
parent | 7cc9621d115303ab71d8cf8e49f5dfe428636145 (diff) | |
download | tor-84d18f70f3400df3e9c3b3c47288e82cd9160f6e.tar.gz tor-84d18f70f3400df3e9c3b3c47288e82cd9160f6e.zip |
sched: Always call on_channel_free() regardless of state
A channel can bounce in the scheduler and bounce out with the IDLE state which
means that if it came in the scheduler once, it has socket information that
needs to be freed from the global hash table.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/or/scheduler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c index aaf991407a..39427b7827 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -547,11 +547,11 @@ scheduler_release_channel,(channel_t *chan)) offsetof(channel_t, sched_heap_idx), chan); } - if (the_scheduler->on_channel_free) { - the_scheduler->on_channel_free(chan); - } } + if (the_scheduler->on_channel_free) { + the_scheduler->on_channel_free(chan); + } chan->scheduler_state = SCHED_CHAN_IDLE; } |