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