]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_iax2: Fix channel left locked in off nominal code path.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 15 Oct 2013 20:01:58 +0000 (20:01 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 15 Oct 2013 20:01:58 +0000 (20:01 +0000)
........

Merged revisions 401016 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401017 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 1bbf18eb2c4926e01c71958078343fece59a43a6..79732fa426a7c4474f575209dd29228ea8dc0c34 100644 (file)
@@ -10400,9 +10400,9 @@ static int socket_process_helper(struct iax2_thread *thread)
                                                                                ast_set_read_format(iaxs[fr->callno]->owner, ast_channel_readformat(iaxs[fr->callno]->owner));
                                                                        }
                                                                        ast_format_cap_copy(native, orignative);
-                                                                       ast_channel_unlock(iaxs[fr->callno]->owner);
                                                                        orignative = ast_format_cap_destroy(orignative);
                                                                }
+                                                               ast_channel_unlock(iaxs[fr->callno]->owner);
                                                        }
                                                } else {
                                                        ast_debug(1, "Neat, somebody took away the channel at a magical time but i found it!\n");