<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Cyrus replication leak</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<UL>
<P><FONT SIZE=2 FACE="Arial CE">Hello,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial CE">I found leak of file descriptors in cyrus code in case of communication errors.</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">I the log file is very big and you kill sync_server you can turn into case where there are no more file descriptors for sync_client.</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial CE">Fix:</FONT>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">sync_client.c</FONT></SPAN>
</P>

<P><SPAN LANG="en-us"><FONT FACE="Times New Roman">2574 r = do_user_parse(user, server_list, server_sub_list, server_sieve_list); </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2575 </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2576 if (r) {</FONT></SPAN><SPAN LANG="pl"> </SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2577 sync_folder_list_free(&amp;server_list); </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2578 sync_folder_list_free(&amp;server_sub_list); </FONT></SPAN>

<BR><SPAN LANG="en-us"><I><FONT COLOR="#008000" FACE="Times New Roman">&lt;&lt;-- 1 LINES ADDED --&gt;&gt;</FONT></I><FONT FACE="Times New Roman"> </FONT></SPAN>

<BR><SPAN LANG="en-us"><B><FONT COLOR="#0000FF" FACE="Times New Roman">2579 if (mailbox_open) mailbox_close(&amp;m);</FONT></B><FONT FACE="Times New Roman"> </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2580 return(r); </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Times New Roman">2581 } </FONT></SPAN>
</P>

<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Regards,</FONT></SPAN>

<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Tomasz Zablocki</FONT></SPAN>

<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Alcatel-Lucent</FONT></SPAN>
</P>
</UL>
</BODY>
</HTML>