X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=libexfat%2Fnode.c;h=a5491b1b9d13bc235036b9bf635e9cd0c0e16e1e;hb=e10d9d0b4176f7cfcff9c336309efd22de1ed6d4;hp=fa04e257709eb8d5e949c74ab22d19c8738fd000;hpb=d2a4dd4d36bf8d44329299f11cbf6f13a1871daa;p=android-x86%2Fexternal-exfat.git diff --git a/libexfat/node.c b/libexfat/node.c index fa04e25..a5491b1 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -30,7 +30,6 @@ struct iterator { cluster_t cluster; off_t offset; - int contiguous; char* chunk; }; @@ -99,7 +98,6 @@ static int opendir(struct exfat* ef, const struct exfat_node* dir, exfat_bug("not a directory"); it->cluster = dir->start_cluster; it->offset = 0; - it->contiguous = IS_CONTIGUOUS(*dir); it->chunk = malloc(CLUSTER_SIZE(*ef->sb)); if (it->chunk == NULL) { @@ -109,6 +107,7 @@ static int opendir(struct exfat* ef, const struct exfat_node* dir, if (exfat_pread(ef->dev, it->chunk, CLUSTER_SIZE(*ef->sb), exfat_c2o(ef, it->cluster)) < 0) { + free(it->chunk); exfat_error("failed to read directory cluster %#x", it->cluster); return -EIO; } @@ -119,7 +118,6 @@ static void closedir(struct iterator* it) { it->cluster = 0; it->offset = 0; - it->contiguous = 0; free(it->chunk); it->chunk = NULL; }