Skip to content

Commit e8b79d0

Browse files
error27namjaejeon
authored andcommitted
ntfs: add missing error code in ntfs_mft_record_alloc()
Return -ENOMEM if the kmalloc() fails. Don't return success. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent cd8d29c commit e8b79d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/ntfs/mft.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,6 +2503,7 @@ int ntfs_mft_record_alloc(struct ntfs_volume *vol, const int mode,
25032503
folio_unlock(folio);
25042504
kunmap_local(m);
25052505
folio_put(folio);
2506+
err = -ENOMEM;
25062507
goto undo_mftbmp_alloc;
25072508
}
25082509

0 commit comments

Comments
 (0)