[asterisk-commits] file: trunk r190217 - /trunk/apps/app_directed_pickup.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 23 11:55:53 CDT 2009


Author: file
Date: Thu Apr 23 11:55:48 2009
New Revision: 190217

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=190217
Log:
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

Modified:
    trunk/apps/app_directed_pickup.c

Modified: trunk/apps/app_directed_pickup.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_directed_pickup.c?view=diff&rev=190217&r1=190216&r2=190217
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Thu Apr 23 11:55:48 2009
@@ -105,6 +105,7 @@
 	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))) {




More information about the asterisk-commits mailing list