First clear io then iobuf.
authorSunil Nimmagadda <sunil@nimmagadda.net>
Sat, 23 Aug 2014 19:07:45 +0500
changeset 29 9ced98f59ea6
parent 28 0f57e2995a16
child 30 fec6f692ba74
First clear io then iobuf.
session.c
--- a/session.c	Sat Aug 23 09:19:50 2014 +0500
+++ b/session.c	Sat Aug 23 19:07:45 2014 +0500
@@ -145,8 +145,8 @@
 			iobuf_flush(&entry->iobuf, entry->io.sock);
 	}
 
+	io_clear(&entry->io);
 	iobuf_clear(&entry->iobuf);
-	io_clear(&entry->io);
 	imsgev_clear(&entry->iev_maildrop);
 	logit(LOG_INFO, "%u: session closed", entry->id);
 	free(entry);