Author: tridge Date: 2005-08-04 21:00:38 +0000 (Thu, 04 Aug 2005) New Revision: 9074
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9074 Log: cope with a null ntvfs context in disconnect, so the destructor that runs on a failed ntvfs init works Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c =================================================================== --- branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c 2005-08-04 21:00:15 UTC (rev 9073) +++ branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c 2005-08-04 21:00:38 UTC (rev 9074) @@ -35,7 +35,11 @@ NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) { - struct ntvfs_module_context *ntvfs = tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs; + if (tcon->ntvfs_ctx == NULL) { + return NT_STATUS_INVALID_CONNECTION; + } + ntvfs = tcon->ntvfs_ctx->modules; if (!ntvfs->ops->disconnect) { return NT_STATUS_NOT_IMPLEMENTED; }
