X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Faction_show_graph_json.c;h=6d6e156ebee938f4f9695bb85cc62022b36bab7f;hp=0820fb025614997ae39aca7737ded1406c82a75f;hb=334145367a589792b49db6d0b84cc0e5bcaf2b1a;hpb=33e56e5052a805658254653ea7721bbd95a7fd51 diff --git a/src/action_show_graph_json.c b/src/action_show_graph_json.c index 0820fb0..6d6e156 100644 --- a/src/action_show_graph_json.c +++ b/src/action_show_graph_json.c @@ -48,7 +48,7 @@ static void write_callback (__attribute__((unused)) void *ctx, /* {{{ */ int action_show_graph_json (void) /* {{{ */ { - graph_config_t *cfg; + graph_config_t const *cfg; yajl_gen_config handler_config; yajl_gen handler; @@ -70,10 +70,7 @@ int action_show_graph_json (void) /* {{{ */ /* alloc functions = */ NULL, /* context = */ NULL); if (handler == NULL) - { - graph_destroy (cfg); return (-1); - } printf ("Content-Type: application/json\n"); @@ -87,7 +84,6 @@ int action_show_graph_json (void) /* {{{ */ status = graph_to_json (cfg, handler); - graph_destroy (cfg); yajl_gen_free (handler); return (status);