summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1edd100)
raw | patch | inline | side by side (parent: 1edd100)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 15:37:34 +0000 (15:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 15:37:34 +0000 (15:37 +0000) |
situations, so check for that here to prevent a segmentation fault.
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1584 a5681a0c-68f1-0310-ab6d-d61299d08faa
-- Florian Forster
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1584 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 27965062ae811df26367e41371579f5604951818..f262413befce5f8e9f561b4d32eef0bfaef8a87f 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