[Asterisk-code-review] main/sorcery: Don't fail object set creation from JSON if fi... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Sun Jul 12 17:58:44 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: main/sorcery: Don't fail object set creation from JSON if field fails
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/848/1/main/sorcery.c
File main/sorcery.c:

Line 1600: 			if (object_field->handler(object, object_field->args, &buf)
         : 				|| !(value = ast_json_string_create(buf))
         : 				|| ast_json_object_set(json, object_field->name, value)) {
         : 				ast_debug(5, "Skipping field '%s' for object type '%s'\n",
         : 					object_field->name, object_type->name);
         : 				continue;
> I believe this will cause a memory leak on 'buf' if the second or third con
Yup; fixed.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0bea13de79f66bf9f9ae6ece0e94a2dc1c026a76
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list