From: themylogin <themylogin@gmail.com>
Subject: fix segfault on non-existent RRD file when using rrdcached
 fix segfault on non-existent RRD file when using rrdcached + rrdtool xport
 (like 814ca69 does for rrdtool graph)
Applied-Upstream: https://github.com/oetiker/rrdtool-1.x/commit/24b922a2eae193d5d44c01a75786aca4b277a4db
Date: Wed, 27 Mar 2019 18:09:55 +0100
Reviewed-by: Tobias Oetiker <tobi@oetiker.ch>

Index: rrdtool/src/rrd_xport.c
===================================================================
--- rrdtool.orig/src/rrd_xport.c
+++ rrdtool/src/rrd_xport.c
@@ -231,7 +231,7 @@ static int rrd_xport_fn(
 
 
     /* pull the data from the rrd files ... */
-    if (data_fetch(im) == -1)
+    if (data_fetch(im) != 0)
         return -1;
 
     /* evaluate CDEF  operations ... */
