netsmb: Avoid a read-after-free in smb_t2_request_int()
Defer freeing the request structure until we've decided whether the request should be retried. PR: 255881 MFC after: 1 week
This commit is contained in:
parent
71776d6719
commit
771e95d2e2
@ -737,13 +737,13 @@ smb_t2_request_int(struct smb_t2rq *t2p)
|
|||||||
bad:
|
bad:
|
||||||
smb_iod_removerq(rqp);
|
smb_iod_removerq(rqp);
|
||||||
freerq:
|
freerq:
|
||||||
smb_rq_done(rqp);
|
|
||||||
if (error) {
|
if (error) {
|
||||||
if (rqp->sr_flags & SMBR_RESTART)
|
if (rqp->sr_flags & SMBR_RESTART)
|
||||||
t2p->t2_flags |= SMBT2_RESTART;
|
t2p->t2_flags |= SMBT2_RESTART;
|
||||||
md_done(&t2p->t2_rparam);
|
md_done(&t2p->t2_rparam);
|
||||||
md_done(&t2p->t2_rdata);
|
md_done(&t2p->t2_rdata);
|
||||||
}
|
}
|
||||||
|
smb_rq_done(rqp);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user