changeset 22588:041460202062

ostream-multiplex: Unreference stream parent Otherwise it won't get free'd.
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 09 Oct 2017 18:21:24 +0300
parents 36f70fbf6d2f
children 103a6d51eefe
files src/lib/ostream-multiplex.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ostream-multiplex.c	Mon Oct 09 13:55:06 2017 +0300
+++ b/src/lib/ostream-multiplex.c	Mon Oct 09 18:21:24 2017 +0300
@@ -162,6 +162,7 @@
 	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 */