Thanks to Russell for confirming that this was an issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@110083
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
ast_mutex_lock(&chanspy_ds->lock);
- chanspy_ds->chan = chan;
-
if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, NULL))) {
+ ast_mutex_unlock(&chanspy_ds->lock);
chanspy_ds = chanspy_ds_free(chanspy_ds);
ast_channel_unlock(chan);
return NULL;
}
-
+
+ chanspy_ds->chan = chan;
datastore->data = chanspy_ds;
-
ast_channel_datastore_add(chan, datastore);
return chanspy_ds;