]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
DEBUG should not be active and libraries should not exit anyway ... fix for #760
authorTobias Oetiker <tobi@oetiker.ch>
Wed, 4 Jan 2017 16:15:07 +0000 (17:15 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Wed, 4 Jan 2017 16:15:07 +0000 (17:15 +0100)
src/rrd_open.c

index 91b8e84f1041ee8246fc663e5e471be7e2a90100..c1a49c986673fe3fb39c39828cea7f4ec2129d68 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 /* DEBUG 2 prints information obtained via mincore(2) */
-#define DEBUG 1
+#define DEBUG 
 /* do not calculate exact madvise hints but assume 1 page for headers and
  * set DONTNEED for the rest, which is assumed to be data */
 /* Avoid calling madvise on areas that were already hinted. May be beneficial if
@@ -189,7 +189,8 @@ rrd_file_t *rrd_open(
         (RRD_READONLY | RRD_READWRITE)) {
         /* Both READONLY and READWRITE were given, which is invalid.  */
         rrd_set_error("in read/write request mask");
-        exit(-1);
+        free(rrd_file);
+        return NULL;
     }
 #endif