validate: Fix json serialized object leaks
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 30 May 2017 21:42:07 +0000 (17:42 -0400)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 1 Jun 2017 20:57:50 +0000 (16:57 -0400)
validate/gst/validate/gst-validate-report.c
validate/gst/validate/gst-validate-scenario.c

index d79a459..017a3c6 100644 (file)
@@ -67,6 +67,7 @@ gst_validate_report_serialize (GstValidateReport * report)
   json_object_set_string_member (jreport, "details", report->message);
 
   node = json_node_init_object (node, jreport);
+  json_object_unref (jreport);
 
   return node;
 }
@@ -877,8 +878,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
 
       GstValidateActionParameter playback_time_param = {
         .name = "playback-time",
-        .description =
-            "The playback time at which the action will be executed",
+        .description = "The playback time at which the action will be executed",
         .mandatory = FALSE,
         .types = "double,string",
         .possible_variables =
@@ -923,8 +923,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
             "\n     optional                   : "
             "Don't raise an error if this action hasn't been executed or failed"
             "\n%-32s  Possible types:"
-            "\n%-32s    boolean"
-            "\n%-32s  Default: false","","","");
+            "\n%-32s    boolean" "\n%-32s  Default: false", "", "", "");
       }
 
       if (!has_parameters)
index 55630d7..0526a92 100644 (file)
@@ -253,6 +253,7 @@ gst_validate_action_serialize (GstValidateAction * action)
   g_free (action_args);
 
   node = json_node_init_object (node, jreport);
+  json_object_unref (jreport);
 
   return node;
 }