[Asterisk-code-review] channel: Hang-up crashed Asterisk while freeing private data. (asterisk[master])
Alexander Traud
asteriskteam at digium.com
Fri Aug 26 08:49:54 CDT 2016
Alexander Traud has uploaded a new change for review.
https://gerrit.asterisk.org/3724
Change subject: channel: Hang-up crashed Asterisk while freeing private data.
......................................................................
channel: Hang-up crashed Asterisk while freeing private data.
Private data of each channel driver is an opaque structure. Some channel drivers
use ast_malloc, some drivers use reference counting. To avoid any crash, this
private data is not released at this place in source code anymore. The general
channel driver cannot do this. Instead, you should investigate why your call was
not hung up, because reaching that code section indicates a software bug.
ASTERISK-26306 #close
Change-Id: Id085417d7e0a5c61382582e7d250b56ab3c00a1b
---
M main/channel.c
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/24/3724/1
diff --git a/main/channel.c b/main/channel.c
index 1f18d53..71d6da8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2223,8 +2223,12 @@
ast_channel_unlock(chan);
if (ast_channel_tech_pvt(chan)) {
- ast_log_callid(LOG_WARNING, callid, "Channel '%s' may not have been hung up properly\n", ast_channel_name(chan));
- ast_free(ast_channel_tech_pvt(chan));
+ ast_log_callid(LOG_WARNING, callid, "Channel '%s' may not have been hung up" \
+ " properly; leaking memory. Please report via http://issues.asterisk.org." \
+ " If feasible, please include" \
+ " http://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace" \
+ " via an interactive session in the GNU Debugger (gdb).\n",
+ ast_channel_name(chan));
}
if (ast_channel_sched(chan)) {
--
To view, visit https://gerrit.asterisk.org/3724
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id085417d7e0a5c61382582e7d250b56ab3c00a1b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
More information about the asterisk-code-review
mailing list