ntfs: do not dereference a null ctx on error
authorDanila Chernetsov <listdansp@mail.ru>
Thu, 18 May 2023 15:21:46 +0000 (00:21 +0900)
committerChristian Brauner <brauner@kernel.org>
Wed, 24 May 2023 09:10:14 +0000 (11:10 +0200)
commitaa4b92c5234878d55da96d387ea4d3695ca5e4ab
treec3cdd6c37ba8497c40835cdd84bcd29d257eb4f0
parent6405fee9b0d04ea8a5a2a7fa671f8f45765d8dcb
ntfs: do not dereference a null ctx on error

In ntfs_mft_data_extend_allocation_nolock(), if an error condition occurs
prior to 'ctx' being set to a non-NULL value, avoid dereferencing the NULL
'ctx' pointer in error handling.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Danila Chernetsov <listdansp@mail.ru>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ntfs/mft.c