Skip to content
Commit ae3356cb authored by Zongmin Zhou's avatar Zongmin Zhou Committed by Greg Kroah-Hartman
Browse files

ksmbd: prevent memory leak on error return



[ Upstream commit 90044481 ]

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

Fixes: 1819a904 ("ksmbd: reorganize ksmbd_iov_pin_rsp()")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202311031837.H3yo7JVl-lkp@intel.com/


Signed-off-by: default avatarZongmin <Zhou&lt;zhouzongmin@kylinos.cn>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8dc9eb7d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment