diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-19 20:37:18 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-19 20:37:18 +0000 |
commit | be969b95cced133cdc4239ee8d3182fa5bd9d02f (patch) | |
tree | 82ccdcd1757ba4483980096052254be53727a22a /apps | |
parent | d4cfaf20d5910622eae56b32664e2bc877f823b5 (diff) |
Merged revisions 110084 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r110084 | mmichelson | 2008-03-19 15:34:13 -0500 (Wed, 19 Mar 2008) | 12 lines
Merged revisions 110083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r110083 | mmichelson | 2008-03-19 15:33:03 -0500 (Wed, 19 Mar 2008) | 4 lines
Add a missing unlock in the case that memory allocation fails in app_chanspy.
Thanks to Russell for confirming that this was an issue.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@110085 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index f37de3889..66a2d214e 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -478,16 +478,15 @@ static struct chanspy_ds *setup_chanspy_ds(struct ast_channel *chan, struct chan 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; |