[Exim] Exim 4.30 file descriptor leak in rda.c

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Richard.Hall
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] Exim 4.30 file descriptor leak in rda.c
Hi,

The following one-line change to rda.c fixes a file descriptor leak in
rda_get_file_contents() in 4.30

================================================================
*** rda.c.orig  Mon Dec  1 10:15:41 2003
--- rda.c       Wed Dec 24 14:39:56 2003
***************
*** 306,311 ****
--- 306,312 ----
    debug_printf("%d bytes read from %s\n", size, filename);
    }


+ fclose(fwd);
return filebuf;

/* Return an error: the string is already set up. */
================================================================



Found on 4.12 after investigating a 'Too many open files' problem, but
still there in 4.30. Probably been in 4.xx since the outset. Looks OK in
3.xx, if anyone feels the need to revert ;-)

Discovered while streaming a large number of messages down a single
connection, with each having the same sender, which was a list name, with
the list contents in a file containing a single real address. (Yes,
really!) So sender verification was causing the problem, but it will also
fail if recipient verification uses the file, and quite possibly in other
circumstances as well.

Merry Xmas :-)

Richard Hall