nfs4: Fix double delete rpc when WaitCall fails

This commit is contained in:
Pawel Dziepak
2013-01-03 03:25:50 +01:00
parent 6136b82b1e
commit e8ef557a56
@@ -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;
};
} }