nfs4: Fix double delete rpc when WaitCall fails
This commit is contained in:
@@ -125,6 +125,9 @@ Request::_SendTCP(Cookie* cookie)
|
|||||||
}
|
}
|
||||||
} while (result != B_OK && (hard || attempts++ < retryLimit));
|
} while (result != B_OK && (hard || attempts++ < retryLimit));
|
||||||
|
|
||||||
|
if (result != B_OK)
|
||||||
|
return result;
|
||||||
|
|
||||||
if (cookie != NULL)
|
if (cookie != NULL)
|
||||||
cookie->UnregisterRequest(rpc);
|
cookie->UnregisterRequest(rpc);
|
||||||
|
|
||||||
@@ -133,11 +136,11 @@ Request::_SendTCP(Cookie* cookie)
|
|||||||
result = rpc->fError;
|
result = rpc->fError;
|
||||||
delete rpc;
|
delete rpc;
|
||||||
return result;
|
return result;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
fReply.SetTo(rpl);
|
fReply.SetTo(rpl);
|
||||||
delete rpc;
|
delete rpc;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user