<p></p>
<p>To free memory applied patch</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-md">--- a/src/modules/tls/tls_init.c</span>
<span class="pl-mi1">+++ b/src/modules/tls/tls_init.c</span>
<span class="pl-mdr">@@ -627,8 +627,9 @@</span> int prepare_keylog_file(str session_keylog_filename)
        * the tool is run multiple times.
        */
        bio_keylog = BIO_new_file(keylog_file, "a");
<span class="pl-mi1"><span class="pl-mi1">+</span>       pkg_free(keylog_file);</span>
        if (bio_keylog == NULL) {
<span class="pl-md"><span class="pl-md">-</span>               LOG(tls_log, "Error writing keylog file: %s\n", keylog_file);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>               LOG(tls_log, "Error writing keylog file: %.*s\n", session_keylog_filename.len, session_keylog_filename.s);</span>
                return 1;
        }
 </pre></div>
<p>As session keys may be refreshed during TLS session, then the file open and close operation needs use on each <code>keylog_callback</code>.<br>
Will it be trick on a server with a lot of connected TLS clients?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2785#issuecomment-869541733">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJW2MQKBL5LI4MSHTDTVBAPTANCNFSM47BQRZIA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJ5DH4ULW5NXS2EKRDTVBAPTA5CNFSM47BQRZIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGPKCOZI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2785#issuecomment-869541733",
"url": "https://github.com/kamailio/kamailio/pull/2785#issuecomment-869541733",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>