r1631: don't use req->transport after req has been destroyed
authorAndrew Tridgell <tridge@samba.org>
Tue, 3 Aug 2004 05:59:28 +0000 (05:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:57:45 +0000 (12:57 -0500)
(This used to be commit 35f4ad4700de25085a2d0e5d0f9674ca2e606cd1)

source4/libcli/raw/rawfile.c

index 5128ba96cec15fc9ba4c13880e60d68b010bc906..0d00ffcca62464434ccd6838cc45d6a1eb3f6112 100644 (file)
@@ -267,6 +267,7 @@ static struct cli_request *smb_raw_t2open_send(struct cli_tree *tree,
 ****************************************************************************/
 static NTSTATUS smb_raw_t2open_recv(struct cli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms)
 {
+       struct cli_transport *transport = req?req->transport:NULL;
        struct smb_trans2 t2;
        NTSTATUS status;
 
@@ -279,8 +280,7 @@ static NTSTATUS smb_raw_t2open_recv(struct cli_request *req, TALLOC_CTX *mem_ctx
 
        parms->t2open.out.fnum =        SVAL(t2.out.params.data, VWV(0));
        parms->t2open.out.attrib =      SVAL(t2.out.params.data, VWV(1));
-       parms->t2open.out.write_time = raw_pull_dos_date3(req->transport,
-                                                         t2.out.params.data + VWV(2));
+       parms->t2open.out.write_time =  raw_pull_dos_date3(transport, t2.out.params.data + VWV(2));
        parms->t2open.out.size =        IVAL(t2.out.params.data, VWV(4));
        parms->t2open.out.access =      SVAL(t2.out.params.data, VWV(6));
        parms->t2open.out.ftype =       SVAL(t2.out.params.data, VWV(7));