]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ksmbd: prevent memory leak on error return
authorZongmin Zhou <zhouzongmin@kylinos.cn>
Mon, 20 Nov 2023 14:48:17 +0000 (23:48 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 24 Nov 2023 02:50:44 +0000 (20:50 -0600)
commit90044481e7cca6cb3125b3906544954a25f1309f
tree8c4048dfa62c8303df82003d192519b8a7859a57
parent98b1cc82c4affc16f5598d4fa14b1858671b2263
ksmbd: prevent memory leak on error return

When allocated memory for 'new' failed,just return
will cause memory leak of 'ar'.

Fixes: 1819a9042999 ("ksmbd: reorganize ksmbd_iov_pin_rsp()")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202311031837.H3yo7JVl-lkp@intel.com/
Signed-off-by: Zongmin Zhou<zhouzongmin@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/ksmbd_work.c