[Asterisk-code-review] astobj2: Fix inverted check ao2 container clone. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Wed Oct 3 08:21:32 CDT 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/10390 )

Change subject: astobj2: Fix inverted check ao2_container_clone.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c
File main/astobj2_container.c:

https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c@771
PS1, Line 771: 	if (!(flags & OBJ_NOLOCK)) {
> The test was not inverted. […]
Actually now that I'm looking at this again why do we need to lock clone at all?  The only pointer to clone is the local variable so it's impossible for any other thread to access clone.  Locking inside ao2_container_dup makes sense but in this function it seems pointless.



-- 
To view, visit https://gerrit.asterisk.org/10390
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
Gerrit-Change-Number: 10390
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 03 Oct 2018 13:21:32 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181003/ca2ef524/attachment.html>


More information about the asterisk-code-review mailing list