Properly track JSON reference to make code match comment.
authorJennifer Richards <jennifer@painless-security.com>
Fri, 2 Jun 2017 20:07:22 +0000 (16:07 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Tue, 6 Jun 2017 18:21:29 +0000 (14:21 -0400)
common/tr_constraint.c

index 7c8676c..f1227f6 100644 (file)
@@ -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;
 }