[Asterisk-code-review] tcptls: Prevent crash when freeing OpenSSL errors. (asterisk[20])
Friendly Automation
asteriskteam at digium.com
Mon Oct 31 09:41:52 CDT 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19510 )
Change subject: tcptls: Prevent crash when freeing OpenSSL errors.
......................................................................
tcptls: Prevent crash when freeing OpenSSL errors.
write_openssl_error_to_log has been erroneously
using ast_free instead of free, which will
cause a crash when MALLOC_DEBUG is enabled since
the memory was not allocated by Asterisk's memory
manager. This changes it to use the actual free
function directly to avoid this.
ASTERISK-30278 #close
Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
---
M main/tcptls.c
1 file changed, 19 insertions(+), 1 deletion(-)
Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/main/tcptls.c b/main/tcptls.c
index b2756d1..dc25cb4 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -126,7 +126,7 @@
ast_log(LOG_ERROR, "%.*s\n", (int) length, buffer);
}
- ast_free(buffer);
+ ast_std_free(buffer);
}
#endif
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19510
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
Gerrit-Change-Number: 19510
Gerrit-PatchSet: 2
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221031/c397d9e9/attachment-0001.html>
More information about the asterisk-code-review
mailing list