summaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2018-10-24 03:50:33 +0200
committerSteve French <stfrench@microsoft.com>2018-10-24 14:21:41 +0200
commit32a1fb36f6e50183871c2c1fcf5493c633e84732 (patch)
treeab417190efe7b6e03b36cfaf91ec4b47ff807f36 /fs/cifs/transport.c
parentsmb3 - clean up debug output displaying network interfaces (diff)
downloadlinux-32a1fb36f6e50183871c2c1fcf5493c633e84732.tar.xz
linux-32a1fb36f6e50183871c2c1fcf5493c633e84732.zip
cifs: allow calling SMB2_xxx_free(NULL)
Change these free functions to allow passing NULL as the argument and treat it as a no-op just like free(NULL) would. Or, if rqst->rq_iov is NULL. The second scenario could happen for smb2_queryfs() if the call to SMB2_query_info_init() fails and we go to qfs_exit to clean up and free all resources. In that case we have not yet assigned rqst[2].rq_iov and thus the rq_iov dereference in SMB2_close_free() will cause a NULL pointer dereference. Fixes: 1eb9fb52040f ("cifs: create SMB2_open_init()/SMB2_open_free() helpers") Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com> CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/transport.c')
0 files changed, 0 insertions, 0 deletions