Browse code

tls: keylog_file variable freed after use

Sergey Safarov authored on 28/06/2021 09:34:33
Showing 1 changed files
... ...
@@ -627,8 +627,9 @@ int prepare_keylog_file(str session_keylog_filename)
627 627
 	* the tool is run multiple times.
628 628
 	*/
629 629
 	bio_keylog = BIO_new_file(keylog_file, "a");
630
+	pkg_free(keylog_file);
630 631
 	if (bio_keylog == NULL) {
631
-		LOG(tls_log, "Error writing keylog file: %s\n", keylog_file);
632
+		LOG(tls_log, "Error writing keylog file: %.*s\n", session_keylog_filename.len, session_keylog_filename.s);
632 633
 		return 1;
633 634
 	}
634 635