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

metze at samba.org metze at samba.org
Fri Apr 27 14:17:29 GMT 2007


Author: metze
Date: 2007-04-27 14:17:28 +0000 (Fri, 27 Apr 2007)
New Revision: 22534

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

Log:
don't remove socket and fd_event before we told the
packet layer.

also fix double free (left over from cut-n-paste)

metze
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c	2007-04-27 14:00:27 UTC (rev 22533)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c	2007-04-27 14:17:28 UTC (rev 22534)
@@ -50,24 +50,22 @@
 
 	if (!sock) return;
 
+	if (sock->packet) {
+		packet_recv_disable(sock->packet);
+		packet_set_fde(sock->packet, NULL);
+		packet_set_socket(sock->packet, NULL);
+	}
+
 	if (sock->fde) {
 		talloc_free(sock->fde);
 		sock->fde = NULL;
 	}
 
 	if (sock->sock) {
-		talloc_free(sock->fde);
-		sock->fde = NULL;
 		talloc_free(sock->sock);
 		sock->sock = NULL;
 	}
 
-	if (sock->packet) {
-		packet_recv_disable(sock->packet);
-		packet_set_fde(sock->packet, NULL);
-		packet_set_socket(sock->packet, NULL);
-	}
-
 	if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) {
 		status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
 	}



More information about the samba-cvs mailing list