[Asterisk-code-review] res pjsip session: segfault on already disconnected session (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Sep 1 13:42:50 CDT 2016


George Joseph has posted comments on this change.

Change subject: res_pjsip_session: segfault on already disconnected session
......................................................................


Patch Set 8:

(1 comment)

https://gerrit.asterisk.org/#/c/3514/8/res/res_pjsip_session.c
File res/res_pjsip_session.c:

PS8, Line 2102: #ifdef HAVE_PJSIP_INV_SESSION_REF
              : 	if (pjsip_inv_add_ref(invite->session->inv_session) != PJ_SUCCESS) {
              : 		ast_log(LOG_ERROR, "Can't increase the session reference counter\n");
              : 		return -1;
              : 	}
              : #endif
> I don't think it's better to hold this object/memory before using.
I'll only be slightly more complex and if you don't you'll still run the risk of the pool being destroyed between the check of the state and the add_ref.

So, yes.  I insist. :)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d28b1fb3b91f0492a911d110049d670fdc3c8d7
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list