]> granicus.if.org Git - libevent/commit
Fix a nasty dangling-event bug when using rate-limiting groups
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Aug 2010 16:08:40 +0000 (12:08 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Aug 2010 16:08:40 +0000 (12:08 -0400)
commit0bffe43a15fbd43bc7826acb88a3bada528c8adf
treef3f4ce3467227d47693f9b334ef7175790424e39
parentff481a8e43999c4ba1556bc472b5e69fce7ea353
Fix a nasty dangling-event bug when using rate-limiting groups

When we freed a bufferevent that was in a rate-limiting group and
blocked on IO, the process of freeing it caused it to get removed
from the group.  But removing the bufferevent from the group made
its limits get removed, which could make it get un-suspended and in
turn cause its events to get re-added.  Since we would then
immediately _free_ the events, this would result in dangling
pointers.

Fixes bug 3041007.
bufferevent.c
bufferevent_ratelim.c
ratelim-internal.h
test/test-ratelim.c