Index: apps/app_dial.c =================================================================== --- apps/app_dial.c (revision 320498) +++ apps/app_dial.c (working copy) @@ -2402,7 +2402,8 @@ * 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);