Fix locking in bufferevent_get_options_().

This commit is contained in:
Maxime Henrion 2013-05-23 16:31:53 +00:00 committed by Nick Mathewson
parent 31db8a02bd
commit dbc9cd4dd1

View File

@ -825,10 +825,12 @@ bufferevent_get_options_(struct bufferevent *bev)
{
struct bufferevent_private *bev_p =
EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
enum bufferevent_options options;
BEV_LOCK(bev);
return bev_p->options;
options = bev_p->options;
BEV_UNLOCK(bev);
return options;
}