[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346881057-31479-1-git-send-email-kys@microsoft.com>
Date: Wed, 5 Sep 2012 14:37:35 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
ben@...adent.org.uk, thozza@...hat.com, dcbw@...hat.com
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>, stable@...r.kernel.org
Subject: [PATCH 1/3] tools/hv: Fix file handle leak
From: Ben Hutchings <ben@...adent.org.uk>
Match up each fopen() with an fclose().
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Cc: stable@...r.kernel.org
---
tools/hv/hv_kvp_daemon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index c8e1013..4514fb4 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -160,7 +160,7 @@ static void kvp_update_file(int pool)
sizeof(struct kvp_record),
kvp_file_info[pool].num_records, filep);
- fflush(filep);
+ fclose(filep);
kvp_release_lock(pool);
}
@@ -207,6 +207,7 @@ static void kvp_update_mem_state(int pool)
kvp_file_info[pool].records = record;
kvp_file_info[pool].num_records = records_read;
+ fclose(filep);
kvp_release_lock(pool);
}
static int kvp_file_init(void)
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists