[Asterisk-code-review] tcptls: Prevent crash when freeing OpenSSL errors. (asterisk[19])
Joshua Colp
asteriskteam at digium.com
Tue Nov 1 06:31:41 CDT 2022
Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19511 )
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; Verified
Joshua Colp: 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/+/19511
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
Gerrit-Change-Number: 19511
Gerrit-PatchSet: 2
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221101/ede446be/attachment.html>
More information about the asterisk-code-review
mailing list