[Asterisk-code-review] bridge.c: Crash during attended transfer when missing a loca... (asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Wed Mar 2 14:59:33 CST 2016
Kevin Harwell has posted comments on this change.
Change subject: bridge.c: Crash during attended transfer when missing a local channel half
......................................................................
Patch Set 1:
(4 comments)
https://gerrit.asterisk.org/#/c/2319/1/main/bridge.c
File main/bridge.c:
Line 3982: RAII_VAR(struct ast_channel *, local_chan, NULL, ao2_cleanup);
> Have I mentioned how much I dislike RAII_VAR? It makes you think that ever
I have never heard you mention it before...j/k of course :-D
>From the subsequent findings it does sound like this is a bad use of it. I will remove it.
Line 4007: if (res) {
: return AST_BRIDGE_TRANSFER_FAIL;
:
> What hangs up local_chan on failure now?
Whoops, I mistook that for plain ole unref for some reason. Will add it back in.
https://gerrit.asterisk.org/#/c/2319/1/main/core_local.c
File main/core_local.c:
Line 255: struct ast_unreal_pvt *base = &p->base;
:
: if (!p) {
> Kind of silly checking for NULL p after you have already used it.
Ha indeed it is silly. I'll move the assignment.
Line 271: ao2_unlock(base);
: ao2_unlock(p);
> Unlocking the same thing twice and missing ao2_ref(p, -1)
I'm surprised this didn't blow up on me.
--
To view, visit https://gerrit.asterisk.org/2319
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6d6061e34c7c95f07116fffac9a09e5d225c880
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list