Loading
smb: client: fix refcount leak in smb2_set_path_attr
Fix refcount leak in `smb2_set_path_attr` when path conversion fails. Function `cifs_get_writable_path` returns `cfile` with its reference counter `cfile->count` increased on success. Function `smb2_compound_op` would decrease the reference counter for `cfile`, as stated in its comment. By calling `smb2_rename_path`, the reference counter of `cfile` would leak if `cifs_convert_path_to_utf16` fails in `smb2_set_path_attr`. Fixes: 8de9e86c ("cifs: create a helper to find a writeable handle by path name") Acked-by:Henrique Carvalho <henrique.carvalho@suse.com> Signed-off-by:
Shuhao Fu <sfual@cse.ust.hk> Signed-off-by:
Steve French <stfrench@microsoft.com>