[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121004211154.625496576@linuxfoundation.org>
Date: Thu, 4 Oct 2012 14:15:43 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
alan@...rguk.ukuu.org.uk, Ben Hutchings <ben@...adent.org.uk>,
"K. Y. Srinivasan" <kys@...rosoft.com>
Subject: [ 22/56] tools/hv: Fix file handle leak
3.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <ben@...adent.org.uk>
commit d5ab482799e7c4c4b7c0aa67e8710dce28115d03 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
tools/hv/hv_kvp_daemon.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -144,7 +144,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);
}
@@ -191,6 +191,7 @@ static void kvp_update_mem_state(int poo
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)
--
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