summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10f0577)
raw | patch | inline | side by side (parent: 10f0577)
author | Claudius Zingerli <gitmail@zeuz.ch> | |
Tue, 5 Jan 2016 17:22:22 +0000 (18:22 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 13 Jan 2016 20:55:08 +0000 (21:55 +0100) |
src/rrdtool.c | patch | blob | history |
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 9b04d10ef753a8cf4818587dda4be1ebc340ad59..7cfdae60302f5e26968288c50ec7572d455d3687 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
return (1);
}
- len = strlen (datadir);
- while ((len > 0) && (datadir[len - 1] == '/'))
+ len = strlen (tmp);
+ while ((len > 0) && (tmp[len - 1] == '/'))
{
len--;
- datadir[len] = 0;
+ tmp[len] = 0;
}
if (len == 0)
return (1);
}
- sfree (datadir);
+ if (datadir != NULL)
+ {
+ sfree (datadir);
+ }
+
datadir = tmp;
}
else if (strcasecmp ("StepSize", key) == 0)