[Asterisk-code-review] json: Add conditionals to avoid locking if Jansson is thread... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Feb 12 12:23:56 CST 2018


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

Change subject: json: Add conditionals to avoid locking if Jansson is thread safe.
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/8186/2/main/json.c
File main/json.c:

https://gerrit.asterisk.org/#/c/8186/2/main/json.c@52
PS2, Line 52: 	return ast_std_malloc(size);
ast_std_malloc() is always going to call malloc() regardless of MALLOC_DEBUG.  Call ast_malloc() instead so MALLOC_DEBUG protects json memory too.


https://gerrit.asterisk.org/#/c/8186/2/main/json.c@57
PS2, Line 57: 	ast_std_free(p);
ast_std_free() is always going to call free() regardless of MALLOC_DEBUG.  Call ast_free() instead so MALLOC_DEBUG protects json memory too.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Id985cb3ffa6681f9ac765642e20fcd187bd4aeee
Gerrit-Change-Number: 8186
Gerrit-PatchSet: 2
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: Mon, 12 Feb 2018 18:23:56 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180212/808d0149/attachment.html>


More information about the asterisk-code-review mailing list