[Asterisk-code-review] Astobj2: Ensure all calls to adjust lock pass a valid object. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Wed Apr 22 16:47:13 CDT 2015


Corey Farrell has posted comments on this change.

Change subject: Astobj2: Ensure all calls to __adjust_lock pass a valid object.
......................................................................


Patch Set 2:

Gerrit won't allow me to reply directly to findings on the first patch.

ast_assert(...) does nothing unless AST_DEVMODE is enabled.  If it's possible for my_container to be NULL or invalid then we need to 'return;' to prevent a crash.

Code outside of astobj2*.c have references to my_container.  I think we should assume that outside code might do an extra unref, breaking this object.  That is the point of almost every call to is_ao2_object, a last ditch effort to avoid a crash.

-- 
To view, visit https://gerrit.asterisk.org/221
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I669100f87937cc3f867cec56a27ae9c01292908f
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list