diff options
author | Walter Doekes <walter+asterisk@wjd.nu> | 2014-05-28 09:43:53 +0000 |
---|---|---|
committer | Walter Doekes <walter+asterisk@wjd.nu> | 2014-05-28 09:43:53 +0000 |
commit | e5194c91fcf0e456b6ead82564023c69245c04b1 (patch) | |
tree | 4ca8a48f3350556279aa03b106cdd0b4e6183827 /channels/chan_unistim.c | |
parent | d14983dbce5f5d51d24bd4f90a5e44d8b02535b3 (diff) |
chan_unistim: Unlock mutex in rare OOM condition.
#ASTERISK-23792 #close
Reported by: Peter Whisker
Review: https://reviewboard.asterisk.org/r/3567/
........
Merged revisions 414677 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 414678 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r-- | channels/chan_unistim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index bdc353844..6762db391 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -6384,10 +6384,10 @@ static struct unistim_device *build_device(const char *cat, const struct ast_var } d = d->next; } + ast_mutex_unlock(&devicelock); if (!(lt = ast_calloc(1, sizeof(*lt)))) { return NULL; } - ast_mutex_unlock(&devicelock); if (create) { if (!(d = ast_calloc(1, sizeof(*d)))) { return NULL; |