diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-01-12 19:48:58 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-01-12 19:48:58 +0000 |
commit | 08089edcd25b2105a7599309afd0225e839debc6 (patch) | |
tree | 502764e6905aa909ef1fc402dfe6deecebf7eb23 /block/vvfat.c | |
parent | cedf9a6f4549900f857954059284a96814e4c7a3 (diff) |
vvfat: fix a file descriptor leak
Fix a file descriptor leak, reported by cppcheck:
[/src/qemu/block/vvfat.c:759]: (error) Resource leak: dir
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r-- | block/vvfat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/vvfat.c b/block/vvfat.c index 26dd474bb5..fe568fe2c7 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -756,6 +756,7 @@ static int read_directory(BDRVVVFATState* s, int mapping_index) if (st.st_size > 0x7fffffff) { fprintf(stderr, "File %s is larger than 2GB\n", buffer); free(buffer); + closedir(dir); return -2; } direntry->size=cpu_to_le32(S_ISDIR(st.st_mode)?0:st.st_size); |