We were using the same bufferevent as the child of two filtering parents,
orphaning another. This made one get freed twice, and the other not at all.
Possible fix for bug
2963306 spotted by Doug Cuthbertson.
struct bufferevent *bevf1, *bevf2;
bevf1 = bufferevent_filter_new(bev1, NULL, NULL,
BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
- bevf2 = bufferevent_filter_new(bev1, NULL, NULL,
+ bevf2 = bufferevent_filter_new(bev2, NULL, NULL,
BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
tt_assert(bevf1);
tt_assert(bevf2);