Rob Shearman : rpcrt4: Stop searching through transfer syntaxes in process_bind_packet when one has been found .

Alexandre Julliard julliard at winehq.org
Thu Nov 12 10:22:09 CST 2009


Module: wine
Branch: master
Commit: a638bff53ddefe52cecc54e1980d9636658a7aaf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a638bff53ddefe52cecc54e1980d9636658a7aaf

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Thu Nov 12 00:31:28 2009 +0000

rpcrt4: Stop searching through transfer syntaxes in process_bind_packet when one has been found.

Fixes Valgrind errors in various tests using RPC.

---

 dlls/rpcrt4/rpc_server.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index eb31e8b..1bd1235 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -213,8 +213,12 @@ static RPC_STATUS process_bind_packet(RpcConnection *conn, RpcPktBindHdr *hdr, R
         unsigned int j;
 
         for (j = 0; !sif && j < ctxt_elem->num_syntaxes; j++)
+        {
             sif = RPCRT4_find_interface(NULL, &ctxt_elem->abstract_syntax,
                                         &ctxt_elem->transfer_syntaxes[j], FALSE);
+            if (sif)
+                break;
+        }
 
         if (sif)
         {




More information about the wine-cvs mailing list