mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
MFC 200084:
Properly return an error reply if an NFS remove or link operation fails. Previously the failing operation would allocate an mbuf and construct an error reply, but because the function did not return 0, the NFS server assumed it had failed to generate a reply and would leak the reply mbuf as well as not sending the reply to the NFS client.
This commit is contained in:
parent
24ca088da7
commit
f6007c0081
1 changed files with 3 additions and 4 deletions
|
|
@ -1810,10 +1810,9 @@ out:
|
|||
}
|
||||
ereply:
|
||||
nfsm_reply(NFSX_WCCDATA(v3));
|
||||
if (v3) {
|
||||
if (v3)
|
||||
nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft);
|
||||
error = 0;
|
||||
}
|
||||
error = 0;
|
||||
nfsmout:
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
if (nd.ni_dvp) {
|
||||
|
|
@ -2187,8 +2186,8 @@ ereply:
|
|||
if (v3) {
|
||||
nfsm_srvpostop_attr(getret, &at);
|
||||
nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft);
|
||||
error = 0;
|
||||
}
|
||||
error = 0;
|
||||
/* fall through */
|
||||
|
||||
nfsmout:
|
||||
|
|
|
|||
Loading…
Reference in a new issue