[Asterisk-code-review] res pjsip session: Fix multiple leaks. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Tue Nov 7 09:12:06 CST 2017
Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/7084 )
Change subject: res_pjsip_session: Fix multiple leaks.
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/7084/1/res/res_pjsip_session.c
File res/res_pjsip_session.c:
https://gerrit.asterisk.org/#/c/7084/1/res/res_pjsip_session.c@241
PS1, Line 241: if (AST_VECTOR_INIT(&cloned->sessions, AST_VECTOR_SIZE(&media_state->sessions))) {
: ast_sip_session_media_state_free(cloned);
: return NULL;
: }
:
: if (AST_VECTOR_INIT(&cloned->read_callbacks, AST_VECTOR_SIZE(&media_state->read_callbacks))) {
: ast_sip_session_media_state_free(cloned);
: return NULL;
: }
These are already initialized when allocating the cloned media state. I believe this actually introduces a memory leak where the old elems is never freed.
--
To view, visit https://gerrit.asterisk.org/7084
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5ffc9b198683fa7e9bf166d74d30c1334c23acb
Gerrit-Change-Number: 7084
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Tue, 07 Nov 2017 15:12:06 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/768caf36/attachment-0001.html>
More information about the asterisk-code-review
mailing list