[Asterisk-code-review] stasis bridges.c: Fix off-nominal json memory leaks. (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Tue Nov 7 09:23:26 CST 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/7022 )

Change subject: stasis_bridges.c: Fix off-nominal json memory leaks.
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.asterisk.org/#/c/7022/1/main/stasis_bridges.c
File main/stasis_bridges.c:

https://gerrit.asterisk.org/#/c/7022/1/main/stasis_bridges.c@883
PS1, Line 883: 	if (!out) {
             : 		ast_json_unref(json_target);
             : 		ast_json_unref(json_transferee);
             : 		return NULL;
             : 	}
> I don't think we should work around this jansson bug by potentially calling
Actually after looking back at our code calling json_decref would not work anyway since the object could potentially have been freed thus it could attempt to reference freed memory.

So patching the jansson code as you have done would be best.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1181a36b317c86bff1ef2e44a17a0b1c73cfdc8
Gerrit-Change-Number: 7022
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 07 Nov 2017 15:23:26 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/90dd9332/attachment.html>


More information about the asterisk-code-review mailing list