dorimanx / exfat-nofuse

Android ARM Linux non-fuse read/write kernel driver for exFat and VFat Android file systems
GNU General Public License v2.0
709 stars 324 forks source link

Fix leak for symbolic link in exfat_lookup #100

Closed cccheng closed 7 years ago

cccheng commented 7 years ago

While exfat_lookup() for symbolic file, we Should not alloc memory to EXFAT_I(inode)->target since the corredspoding exfat inode info is still is in memory and EXFAT_I(inode)->target has not released yet. If we do so, memory leak would happen. Therefore we only alloc it if not null.

Reviewed-by: Ethan Wu ethanwu@synology.com Signed-off-by: Chung-Chiang Cheng cccheng@synology.com