Module: wine Branch: master Commit: d8e467b0fd66ef6032580727b41979668e8aa4ef URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8e467b0fd66ef6032580727b4...
Author: Rob Shearman rob@codeweavers.com Date: Fri Nov 30 21:31:47 2007 +0000
rpcrt4: Reverse the conditions for which *pPointer is assigned base_ptr_val in PointerUnmarshall.
In one condition (fMustAlloc == TRUE), base_ptr_val may be uninitialised and so cause a valgrind warning. Reversing the check is harmless and doesn't result in a performance decrease.
---
dlls/rpcrt4/ndr_marshall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 8300b64..84a1990 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1061,7 +1061,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, /* this must be done after the call to the unmarshaller, since when we are * unmarshalling reference pointers on the server side *pPointer will be * pointing to valid data */ - if (base_ptr_val && (!fMustAlloc || attr & RPC_FC_P_DEREF)) + if ((!fMustAlloc || attr & RPC_FC_P_DEREF) && base_ptr_val) *pPointer = base_ptr_val; }