summaryrefslogtreecommitdiff
path: root/ext4_utils/ext4_utils.c
diff options
context:
space:
mode:
authorRobert CH Chou <Robert_CH_Chou@acer.com.tw>2011-06-04 22:04:53 +0800
committerRobert CH Chou <Robert_CH_Chou@acer.com.tw>2011-06-06 22:04:45 +0800
commit0a5b2a30ff134958d028e995b4e4cb9cf9021bd9 (patch)
tree778a1539bb114fcadc32114e90c1f92183c8b6e8 /ext4_utils/ext4_utils.c
parent880071e1ac4d35035fa30ddd992b81360408074b (diff)
downloadextras-0a5b2a30ff134958d028e995b4e4cb9cf9021bd9.tar.gz
fix fd leaking and deallocation freed resource
Change-Id: Ibee4d7000bce5bc8c2e45339d4d53a242569ae4e
Diffstat (limited to 'ext4_utils/ext4_utils.c')
-rw-r--r--ext4_utils/ext4_utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c
index 60a4da33..bc5cfd0e 100644
--- a/ext4_utils/ext4_utils.c
+++ b/ext4_utils/ext4_utils.c
@@ -360,6 +360,7 @@ static u64 get_block_device_size(const char *filename)
#elif defined(__APPLE__) && defined(__MACH__)
ret = ioctl(fd, DKIOCGETBLOCKCOUNT, &size);
#else
+ close(fd);
return 0;
#endif