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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2785#issuecomment-869541733
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to