[Asterisk-code-review] res pjsip history: Fix multiple leaks on vector append failure. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Nov 7 16:23:21 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7100 )

Change subject: res_pjsip_history: Fix multiple leaks on vector append failure.
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/7100/1/res/res_pjsip_history.c
File res/res_pjsip_history.c:

https://gerrit.asterisk.org/#/c/7100/1/res/res_pjsip_history.c@759
PS1, Line 759: 	if (log_level != -1) {
Need to check that entry is not NULL.


https://gerrit.asterisk.org/#/c/7100/1/res/res_pjsip_history.c@1072
PS1, Line 1072: 	ast_free(final);
              : 
              : 	return result;
While on the subject of leaks, the stack vector is leaked at this return point.

AST_VECTOR_FREE(&stack);


https://gerrit.asterisk.org/#/c/7100/1/res/res_pjsip_history.c@1114
PS1, Line 1114: 	if (!queue) {
              : 		return NULL;
              : 	}
Leaks:
AST_VECTOR_FREE(output);
ast_free(output);



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I41e8d5183ace284095cc721f3b1fb32ade3f940f
Gerrit-Change-Number: 7100
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 07 Nov 2017 22:23:21 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/c62b3f1a/attachment-0001.html>


More information about the asterisk-code-review mailing list