diff options
author | Joe Perches <joe@perches.com> | 2018-12-20 23:50:48 -0600 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-12-28 10:09:46 -0600 |
commit | 0544b324e62c177c3a9e9c3bdce22e6db9f34588 (patch) | |
tree | 889b401a257a882a6a4882192b8726e75c87677b /virt | |
parent | 29cbfa1b2be2e51785f871351d321896861f2ce8 (diff) |
cifs: check kzalloc return
kzalloc can return NULL so an additional check is needed. While there
is a check for ret_buf there is no check for the allocation of
ret_buf->crfid.fid - this check is thus added. Both call-sites
of tconInfoAlloc() check for NULL return of tconInfoAlloc()
so returning NULL on failure of kzalloc() here seems appropriate.
As the kzalloc() is the only thing here that can fail it is
moved to the beginning so as not to initialize other resources
on failure of kzalloc.
Fixes: 3d4ef9a15343 ("smb3: fix redundant opens on root")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions