mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
(closes issue #10437)
Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3335,16 +3335,10 @@ static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char
|
||||
else
|
||||
chan_misdn_log(1,0,"misdn_new: no exten given.\n");
|
||||
|
||||
if (callerid) {
|
||||
char *cid_name, *cid_num;
|
||||
|
||||
ast_callerid_parse(callerid, &cid_name, &cid_num);
|
||||
if (callerid)
|
||||
/* Don't use ast_set_callerid() here because it will
|
||||
* generate a needless NewCallerID event */
|
||||
tmp->cid.cid_num = ast_strdup(cid_num);
|
||||
tmp->cid.cid_ani = ast_strdup(cid_num);
|
||||
tmp->cid.cid_name = ast_strdup(cid_name);
|
||||
}
|
||||
|
||||
{
|
||||
if (pipe(chlist->pipe)<0)
|
||||
|
Reference in New Issue
Block a user