[Asterisk-code-review] Astobj2: Ensure all calls to adjust lock pass a valid object. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Apr 22 16:29:29 CDT 2015
Richard Mudgett has posted comments on this change.
Change subject: Astobj2: Ensure all calls to __adjust_lock pass a valid object.
......................................................................
Patch Set 1:
(2 comments)
https://gerrit.asterisk.org/#/c/221/1/main/astobj2_hash.c
File main/astobj2_hash.c:
Line 189:
: if (!is_ao2_object(my_container)) {
: ast_log(LOG_ERROR, "Container is not valid.\n");
: ast_assert(0);
: return;
: }
We are in real trouble if the container is invalid since we are dealing with a container node.
This should just be an assert:
ast_assert(is_ao2_object(my_container));
https://gerrit.asterisk.org/#/c/221/1/main/astobj2_rbtree.c
File main/astobj2_rbtree.c:
Line 881:
: if (!is_ao2_object(my_container)) {
: ast_log(LOG_ERROR, "Container is not valid.\n");
: ast_assert(0);
: return;
: }
We are in real trouble if the container is invalid since we are dealing with a container node.
This should just be an assert:
ast_assert(is_ao2_object(my_container));
--
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: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list