[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH] file-posix: Don't leak fd in hdev_get_max_segments
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH] file-posix: Don't leak fd in hdev_get_max_segments |
Date: |
Tue, 14 Mar 2017 23:43:15 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
---
block/file-posix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index c4c0663..e6170f4 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -703,6 +703,7 @@ static int hdev_get_max_segments(const struct stat *st)
}
out:
+ close(fd);
g_free(sysfspath);
return ret;
#else
--
2.9.3
- [Qemu-block] [PATCH] file-posix: Don't leak fd in hdev_get_max_segments,
Fam Zheng <=