graph_{data,def}_json actions: Don't destroy the graph_config_t object.
authorFlorian Forster <octo@verplant.org>
Thu, 9 Sep 2010 08:02:00 +0000 (10:02 +0200)
committerFlorian Forster <octo@verplant.org>
Thu, 9 Sep 2010 08:02:00 +0000 (10:02 +0200)
src/action_graph_data_json.c
src/action_graph_def_json.c

index 388befd..e103b97 100644 (file)
@@ -95,10 +95,7 @@ int action_graph_data_json (void) /* {{{ */
       /* alloc functions = */ NULL,
       /* context = */ NULL);
   if (handler == NULL)
       /* alloc functions = */ NULL,
       /* context = */ NULL);
   if (handler == NULL)
-  {
-    graph_destroy (cfg);
     return (-1);
     return (-1);
-  }
 
   printf ("Content-Type: application/json\n");
 
 
   printf ("Content-Type: application/json\n");
 
@@ -119,7 +116,6 @@ int action_graph_data_json (void) /* {{{ */
   status = inst_data_to_json (inst,
       dp_begin, dp_end, handler);
 
   status = inst_data_to_json (inst,
       dp_begin, dp_end, handler);
 
-  graph_destroy (cfg);
   yajl_gen_free (handler);
 
   return (status);
   yajl_gen_free (handler);
 
   return (status);
index 684ad7a..1ba0678 100644 (file)
@@ -71,10 +71,7 @@ int action_graph_def_json (void) /* {{{ */
       /* alloc functions = */ NULL,
       /* context = */ NULL);
   if (handler == NULL)
       /* alloc functions = */ NULL,
       /* context = */ NULL);
   if (handler == NULL)
-  {
-    graph_destroy (cfg);
     return (-1);
     return (-1);
-  }
 
   printf ("Content-Type: application/json\n");
 
 
   printf ("Content-Type: application/json\n");
 
@@ -88,7 +85,6 @@ int action_graph_def_json (void) /* {{{ */
 
   status = graph_def_to_json (cfg, handler);
 
 
   status = graph_def_to_json (cfg, handler);
 
-  graph_destroy (cfg);
   yajl_gen_free (handler);
 
   return (status);
   yajl_gen_free (handler);
 
   return (status);