This code calls brelse(bh) and then dereferences "bh" on the next line
resulting in a possible use after free. The brelse() should just be
moved down a line.
Fixes:
b676fdbcf4c8 ("exfat: standardize checksum calculation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
chksum = exfat_calc_chksum32(bh->b_data, i, chksum, CS_DEFAULT);
chksum = exfat_calc_chksum32(bh->b_data, i, chksum, CS_DEFAULT);
}
if (index >= 0xFFFF && utbl_checksum == chksum)
}
if (index >= 0xFFFF && utbl_checksum == chksum)