On Mon, Mar 21, 2011 at 05:16:07PM +0000, Jacek Masiulaniec wrote: > Code in client.c implements single SMTP conversation. It doesn't > close the message body descriptor out of carefulness: in case of > extremely long MX records a single message body descriptor is re-used > instead of obtaining new ones from the queue process potentially > hundreds of times.
If you use fdopen(), you should have a corresponding fclose(). Perhaps dup() would be better here, along with responsibility of the issuer close()'ing the descriptor when the connection is done? Or doing the fdopen() earlier and passing a FILE pointer around?
