summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa67d36)
raw | patch | inline | side by side (parent: fa67d36)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 15 Feb 2007 18:43:07 +0000 (19:43 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 15 Feb 2007 18:43:07 +0000 (19:43 +0100) |
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 1c7d66297229e84865b64f411c6775af6ef79107..66e2bf315d1ec6739d9030342d994e572c73757f 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
char *fn;
int status;
+ int i;
+
argc = rc->values_num + 2;
argv = (char **) malloc ((argc + 1) * sizeof (char *));
if (argv == NULL)
free (argv);
free (fn);
+ for (i = 0; i < rc->values_num; i++)
+ free (rc->values[i]);
+
free (rc->values);
rc->values = NULL;
rc->values_num = 0;
}
return (0);
-} /* int rrd_update_file */
+} /* int rrd_write_cache_entry */
static void rrd_cache_flush (int timeout)
{
continue;
}
+ /* will free `rc' */
rrd_write_cache_entry (keys[i], rc);
sfree (keys[i]); keys[i] = NULL;
- sfree (rc->values);
- sfree (rc);
} /* for (i = 0..keys_num) */
free (keys);
if (cache == NULL)
{
+ /* will free `rc' */
rrd_write_cache_entry (filename, rc);
- free (rc->values);
- free (rc);
return (0);
}