From 29f7623c82207914b1ff3123bb1eec3745e3dab2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 29 Nov 2010 22:14:54 -0500 Subject: [PATCH] Possible crash fix when freeing an underlying bufferevent of an openssl bufferevent --- bufferevent_openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index 04dc31e2..3d9a7701 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -525,10 +525,10 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int errcode, int ret) if (dirty_shutdown && bev_ssl->allow_dirty_shutdown) event = BEV_EVENT_EOF; - _bufferevent_run_eventcb(&bev_ssl->bev.bev, event); - stop_reading(bev_ssl); stop_writing(bev_ssl); + + _bufferevent_run_eventcb(&bev_ssl->bev.bev, event); } static void