aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d3b8009..65f5666 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>chan_local</depend>
+ <support_level>core</support_level>
***/
@@ -2408,7 +2409,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
* datastore again, causing a crash
*/
ast_channel_lock(chan);
- if (!ast_channel_datastore_remove(chan, datastore)) {
+ datastore = ast_channel_datastore_find(chan, &dialed_interface_info, NULL); /* make sure we weren't cleaned up already */
+ if (datastore && !ast_channel_datastore_remove(chan, datastore)) {
ast_datastore_free(datastore);
}
ast_channel_unlock(chan);