return;
}
ast_free(doomed->dialstring);
+ ast_channel_cleanup(doomed->peer);
ast_free(doomed);
}
while ((cur = AST_LIST_REMOVE_HEAD(&masq_data->dialed_peers, list))) {
dial_target_free(cur);
}
- masq_data->caller = NULL;
+ masq_data->caller = ast_channel_cleanup(masq_data->caller);
}
static void dial_masquerade_datastore_remove_chan(struct dial_masquerade_datastore *masq_data, struct ast_channel *chan)
ast_datastore_free(datastore);
return NULL;
}
- masq_data->caller = chan;
+ masq_data->caller = ast_channel_ref(chan);
}
datastore->data = masq_data;
return -1;
}
}
- target->peer = peer;
+ target->peer = ast_channel_ref(peer);
/* Put peer target into datastore */
ao2_lock(masq_data);