Fix a double free issue with the Pickup dialplan application.
[asterisk/asterisk.git] / apps / app_directed_pickup.c
index cfba99f..5ce217d 100644 (file)
@@ -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_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))) {
        ast_party_connected_line_free(&connected_caller);
 
        if ((res = ast_answer(chan))) {