summaryrefslogtreecommitdiff
path: root/apps/app_directed_pickup.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-04-23 16:55:48 +0000
committerJoshua Colp <jcolp@digium.com>2009-04-23 16:55:48 +0000
commitada8ae56e178a4c48725f5b0eb48ec53ca2b93a2 (patch)
treeb0d0fe2bba59f48bf2505f0b2d604932a82cf0de /apps/app_directed_pickup.c
parent1ce1f1bb1ffd6bc1780082a9b2d255c8da8bd418 (diff)
Fix a double free issue with the Pickup dialplan application.
As part of the pickup process the connected line information is updated. Part of this process does a shallow copy of the target channel's connected line information to a local structure. Once complete the structure contents are freed. As a result any information in the target channel's connected line information structure is no longer valid. This change will now set the contents back to a clean state so that the freeing of the target channel's connected line information structure when the channel is destroyed will no longer try to double free things. (closes issue #14839) Reported by: lmsteffan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_directed_pickup.c')
-rw-r--r--apps/app_directed_pickup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index cfba99fce..5ce217d7a 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -105,6 +105,7 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
ast_channel_unlock(chan);
connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
ast_channel_queue_connected_line_update(chan, &connected_caller);
+ ast_party_connected_line_init(&target->connected);
ast_party_connected_line_free(&connected_caller);
if ((res = ast_answer(chan))) {