Unverified Commit 0bcf7cfa authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12978 exfat: fix memory leak in exfat_load_bitmap()

parents 72d0ce6c 277541e3
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -110,11 +110,8 @@ int exfat_load_bitmap(struct super_block *sb)
				return -EIO;

			type = exfat_get_entry_type(ep);
			if (type == TYPE_UNUSED)
				break;
			if (type != TYPE_BITMAP)
				continue;
			if (ep->dentry.bitmap.flags == 0x0) {
			if (type == TYPE_BITMAP &&
			    ep->dentry.bitmap.flags == 0x0) {
				int err;

				err = exfat_allocate_bitmap(sb, ep);
@@ -122,6 +119,9 @@ int exfat_load_bitmap(struct super_block *sb)
				return err;
			}
			brelse(bh);

			if (type == TYPE_UNUSED)
				return -EINVAL;
		}

		if (exfat_get_next_cluster(sb, &clu.dir))