From c8e7813f3e76b45ee9d40ef87f296c45db34972f 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@880 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_first.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/program/src/rrd_first.c b/program/src/rrd_first.c index 8df68b86..c1c545fd 100644 --- a/program/src/rrd_first.c +++ b/program/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.30.2