summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7f963b)
raw | patch | inline | side by side (parent: e7f963b)
author | Florian Forster <ff@octo.it> | |
Sun, 2 May 2010 08:43:58 +0000 (10:43 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 2 May 2010 08:43:58 +0000 (10:43 +0200) |
action_graph.c | patch | blob | history |
diff --git a/action_graph.c b/action_graph.c
index 38b1ec9a0e5f0596ad58f78c788bcddd7be38c5b..f517b5c4fe8f805ac1608e22ca4c806d66b6a2e5 100644 (file)
--- a/action_graph.c
+++ b/action_graph.c
};
typedef struct graph_def_s graph_def_t;
+static void graph_def_free (graph_def_t *gd)
+{
+ size_t i;
+
+ if (gd == NULL)
+ return;
+
+ for (i = 0; i < gd->data_sources_num; i++)
+ {
+ free (gd->data_sources[i].file);
+ free (gd->data_sources[i].name);
+ free (gd->data_sources[i].legend);
+ }
+ free (gd->data_sources);
+ free (gd);
+} /* }}} void graph_def_free */
+
static int graph_def_add_ds (graph_def_t *gd, /* {{{ */
const char *file,
const char *in_ds_name, size_t ds_name_len)
(unsigned long) i, gd->data_sources[i].name, gd->data_sources[i].file);
}
- /* FIXME: Free gd */
+ graph_def_free (gd);
return (0);
} /* }}} int action_graph */