From: Jennifer Richards Date: Fri, 2 Jun 2017 20:07:22 +0000 (-0400) Subject: Properly track JSON reference to make code match comment. X-Git-Tag: v3.0.0~25 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=e2a3337b934ea4d5b949c79e3c8e1dd3d57ee392 Properly track JSON reference to make code match comment. --- diff --git a/common/tr_constraint.c b/common/tr_constraint.c index 7c8676c..f1227f6 100644 --- a/common/tr_constraint.c +++ b/common/tr_constraint.c @@ -230,7 +230,6 @@ int tr_constraint_set_validate(TR_CONSTRAINT_SET *cset) { * Create a new constraint set containing all constraints from #orig * with constraint_type #constraint_type and no others. This constraint set is * live until #request is freed. - * TODO: use or remove the request parameter. */ TR_CONSTRAINT_SET *tr_constraint_set_filter(TID_REQ *request, TR_CONSTRAINT_SET *orig, @@ -249,6 +248,7 @@ TR_CONSTRAINT_SET *tr_constraint_set_filter(TID_REQ *request, if (json_object_get(set_member, constraint_type)) json_array_append(new_cs, set_member); } + tid_req_cleanup_json(request, new_cs); return (TR_CONSTRAINT_SET *) new_cs; }