diff options
| author | Mohammad Shahid <mdshahid03@gmail.com> | 2026-07-03 17:51:04 +0530 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-08-24 17:08:53 -0300 |
| commit | 019716ca2633998c0e9c57df08b4e34d384d4b58 (patch) | |
| tree | e491e990a9a2be5928bd581e0e280e51617530c2 /fs | |
| parent | ba22f575de9deeae4ae0859ca4315a7698226237 (diff) | |
smb: client: remove redundant NULL check before kfree()
kfree() safely handles NULL pointers, so the explicit NULL check
before calling kfree() is unnecessary.
This issue was reported by ifnullfree.cocci.
Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/smb/client/ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/smb/client/ioctl.c b/fs/smb/client/ioctl.c index 9fa743be3652..2f152d76be7d 100644 --- a/fs/smb/client/ioctl.c +++ b/fs/smb/client/ioctl.c @@ -133,8 +133,7 @@ static int cifs_set_compression_by_path(unsigned int xid, struct file *filep, close: server->ops->close(xid, tcon, &fid); - if (tmp_cfile) - kfree(tmp_cfile); + kfree(tmp_cfile); cifs_free_open_info(&data); out: free_dentry_path(page); |
