mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
tools/hv: Fix file handle leak
commit d5ab482799
upstream.
Match up each fopen() with an fclose().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
268b7d491c
commit
37b6d804b3
1 changed files with 2 additions and 1 deletions
|
@ -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 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)
|
||||
|
|
Loading…
Reference in a new issue