]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
iostream: Call destroy callback after the destroy() method is called.
authorTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 15:18:31 +0000 (16:18 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 15:18:31 +0000 (16:18 +0100)
src/lib/iostream.c

index 5f15da6420b3e99693488a76234bc8f9784eb5b4..d80a28db6390529cdeb823702f6fa20e495cfc41 100644 (file)
@@ -30,9 +30,9 @@ void io_stream_unref(struct iostream_private *stream)
                return;
 
        stream->close(stream);
+       stream->destroy(stream);
        if (stream->destroy_callback != NULL)
                stream->destroy_callback(stream->destroy_context);
-       stream->destroy(stream);
 
         i_free(stream->name);
         i_free(stream);