[PATCH] rpcrt4: wait_async_request: return error if we received an error

Marcus Meissner marcus at jet.franken.de
Mon Oct 1 16:00:33 CDT 2012


Hi,

Various coverity issues complain about user-after-free scenarios,
all involving this code path.

I strongly think if call_ret signals error, we also need to return
an error condition to avoid the callers from proceeding as if nothing
happened.

Second reiteration with Jaceks comment applied

Ciao, Marcus
---
 dlls/rpcrt4/rpc_transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 686ce68..ce1c95c 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -1882,7 +1882,7 @@ static RPC_STATUS wait_async_request(RpcHttpAsyncData *async_data, BOOL call_ret
 
     if(call_ret) {
         RpcHttpAsyncData_Release(async_data);
-        return RPC_S_OK;
+        return RPC_S_SERVER_UNAVAILABLE;
     }
 
     if(GetLastError() != ERROR_IO_PENDING) {
-- 
1.7.3.4




More information about the wine-patches mailing list