Commit a62283a9c3a46c4ba0d72eb3bc18a3db7f9648e2

Nick Mathewson 2009-07-17T17:46:17

Always hold a reference to a bufferevent when calling its callbacks. Rationale: we hold a lock on the bufferevent when its callbacks are executing, so we need to release the lock afterwards. But the callback might free the bufferevent, so unless we're holding a reference on the bufferevent, the lock might not be there for us to release. svn:r1347