[asterisk-bugs] [Asterisk 0010437]: memory leak in zt_new()
noreply at bugs.digium.com
noreply at bugs.digium.com
Fri Dec 14 08:26:18 CST 2007
The following issue has been set as RELATED TO issue 0011549.
======================================================================
http://bugs.digium.com/view.php?id=10437
======================================================================
Reported By: haklin
Assigned To: file
======================================================================
Project: Asterisk
Issue ID: 10437
Category: Channels/chan_zap
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: 1.4.10
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 79172
Disclaimer on File?: N/A
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 08-13-2007 07:33 CDT
Last Modified: 08-13-2007 09:05 CDT
======================================================================
Summary: memory leak in zt_new()
Description:
zt_new() calls ast_channel_alloc() with cid_num, cid_name but later in
zt_new(), the following code is executed, which overwrites cid-stuff in the
"tmp-channel":
#ifdef PRI_ANI
tmp->cid.cid_num = ast_strdup(i->cid_num);
tmp->cid.cid_name = ast_strdup(i->cid_name);
if (!ast_strlen_zero(i->cid_ani))
tmp->cid.cid_ani = ast_strdup(i->cid_ani);
else
tmp->cid.cid_ani = ast_strdup(i->cid_num);
#else
tmp->cid.cid_num = ast_strdup(i->cid_num);
tmp->cid.cid_ani = ast_strdup(i->cid_num);
tmp->cid.cid_name = ast_strdup(i->cid_name);
#endif
In ast_channel_alloc() cid_num and cid_name are already set and a memory
leak occurs when the ast_strdup() above is executed.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0011549 [patch] Properly set caller id
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
12-14-07 08:26 phsultan Relationship added related to 0011549
======================================================================
More information about the asterisk-bugs
mailing list