OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30be424
)
Fix memory use after free on error paths.
author
relan
<relan@users.noreply.github.com>
Sat, 18 Jan 2014 07:35:26 +0000
(07:35 +0000)
committer
relan
<relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:16 +0000
(08:26 +0300)
libexfat/mount.c
patch
|
blob
|
history
diff --git
a/libexfat/mount.c
b/libexfat/mount.c
index
1202b4d
..
3606ad6
100644
(file)
--- a/
libexfat/mount.c
+++ b/
libexfat/mount.c
@@
-218,17
+218,17
@@
int exfat_mount(struct exfat* ef, const char* spec, const char* options)
if (ef->sb->fat_count != 1)
{
exfat_close(ef->dev);
- free(ef->sb);
exfat_error("unsupported FAT count: %hhu", ef->sb->fat_count);
+ free(ef->sb);
return -EIO;
}
/* officially exFAT supports cluster size up to 32 MB */
if ((int) ef->sb->sector_bits + (int) ef->sb->spc_bits > 25)
{
exfat_close(ef->dev);
- free(ef->sb);
exfat_error("too big cluster size: 2^%d",
(int) ef->sb->sector_bits + (int) ef->sb->spc_bits);
+ free(ef->sb);
return -EIO;
}