mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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
This commit is contained in:
@@ -6384,10 +6384,10 @@ static struct unistim_device *build_device(const char *cat, const struct ast_var
|
|||||||
}
|
}
|
||||||
d = d->next;
|
d = d->next;
|
||||||
}
|
}
|
||||||
|
ast_mutex_unlock(&devicelock);
|
||||||
if (!(lt = ast_calloc(1, sizeof(*lt)))) {
|
if (!(lt = ast_calloc(1, sizeof(*lt)))) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ast_mutex_unlock(&devicelock);
|
|
||||||
if (create) {
|
if (create) {
|
||||||
if (!(d = ast_calloc(1, sizeof(*d)))) {
|
if (!(d = ast_calloc(1, sizeof(*d)))) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user