From 61c29df248b0890384adf6b63e556a24fd2b64bd Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 15 Aug 2006 05:51:04 +0000 Subject: [PATCH] do not loose filedescriptors when rrd_first errors out git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@880 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_first.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rrd_first.c b/src/rrd_first.c index 8df68b8..c1c545f 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -68,6 +68,8 @@ rrd_first_r(const char *filename, const int rraindex) if((rraindex < 0) || (rraindex >= (int)rrd.stat_head->rra_cnt)) { rrd_set_error("invalid rraindex number"); + rrd_free(&rrd); + fclose(in_file); return(-1); } -- 2.11.0