diff -Naur mailutils-0.1.1/mailbox/stream.c mailutils-cvs-20021015/mailbox/stream.c --- mailutils-0.1.1/mailbox/stream.c 2002-03-25 04:46:11.000000000 +0100 +++ mailutils-cvs-20021015/mailbox/stream.c 2002-11-06 18:02:44.000000000 +0100 @@ -76,6 +76,10 @@ stream_close(stream); if (stream->rbuffer.base) free (stream->rbuffer.base); + + if (stream->_destroy) + stream->_destroy (stream); + free (stream); } *pstream = NULL; diff -Naur mailutils-0.1.1/mailbox/tcp.c mailutils-cvs-20021015/mailbox/tcp.c --- mailutils-0.1.1/mailbox/tcp.c 2002-08-25 14:44:51.000000000 +0200 +++ mailutils-cvs-20021015/mailbox/tcp.c 2002-11-06 18:32:50.000000000 +0100 @@ -84,15 +84,6 @@ stream_get_flags(stream, &flags); - if (tcp->state == TCP_STATE_INIT) - { - tcp->port = port; -/* FIXME: this seems very strange, it is: tcp->host = strdup(tcp->host) - is this really intended? */ - if ((tcp->host = strdup (host)) == NULL) - return ENOMEM; - } - switch (tcp->state) { case TCP_STATE_INIT: @@ -221,8 +212,6 @@ if (tcp->fd != -1) close (tcp->fd); - if(tcp->host) - free (tcp->host); free (tcp); }