summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 83b02ee)
raw | patch | inline | side by side (parent: 83b02ee)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 15:38:11 +0000 (15:38 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 15:38:11 +0000 (15:38 +0000) |
situations, so check for that here to prevent a segmentation fault.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1585 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1585 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_open.c | patch | blob | history |
diff --git a/src/rrd_open.c b/src/rrd_open.c
index c4ee3c0a0727f2dc8000602c8e572744fab0f529..06afabe12540400a1635e190f0b3b04e73f64665 100644 (file)
--- a/src/rrd_open.c
+++ b/src/rrd_open.c
unsigned long i;
ssize_t _page_size = sysconf(_SC_PAGESIZE);
+ if (rrd_file == NULL) {
+#if defined DEBUG && DEBUG
+ fprintf (stderr, "rrd_dontneed: Argument 'rrd_file' is NULL.\n");
+#endif
+ return;
+ }
+
#if defined DEBUG && DEBUG > 1
mincore_print(rrd_file, "before");
#endif