diff --git a/src/lib/ostream-multiplex.c b/src/lib/ostream-multiplex.c index 7efcd5f3bb..afc00f7261 100644 --- a/src/lib/ostream-multiplex.c +++ b/src/lib/ostream-multiplex.c @@ -162,6 +162,7 @@ static void o_stream_multiplex_ochannel_destroy(struct iostream_private *stream) struct multiplex_ochannel **channelp; struct multiplex_ochannel *channel = (struct multiplex_ochannel*)stream; o_stream_multiplex_ochannel_close(stream, TRUE); + o_stream_unref(&channel->ostream.parent); if (channel->buf != NULL) buffer_free(&channel->buf); /* delete the channel */