svn commit: samba r11516 - in branches/SAMBA_4_0/source/librpc/rpc: .

vlendec at samba.org vlendec at samba.org
Sat Nov 5 09:32:16 GMT 2005


Author: vlendec
Date: 2005-11-05 09:32:15 +0000 (Sat, 05 Nov 2005)
New Revision: 11516

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11516

Log:
Fix a valgrind bug I introduce with queued requests
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c	2005-11-05 09:31:24 UTC (rev 11515)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c	2005-11-05 09:32:15 UTC (rev 11516)
@@ -856,13 +856,16 @@
 	req->state = RPC_REQUEST_DONE;
 	DLIST_REMOVE(c->pending, req);
 	data_blob_free(data);
-	if (req->async.callback) {
-		req->async.callback(req);
-	}
 
 	if (c->request_queue != NULL) {
+		/* We have to look at shipping further requests before calling
+		 * the async function, that one might close the pipe */
 		dcerpc_ship_next_request(c);
 	}
+
+	if (req->async.callback) {
+		req->async.callback(req);
+	}
 }
 
 /*



More information about the samba-cvs mailing list