diff options
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_sock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index 361d0d4a5f..8de43d8454 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -73,6 +73,8 @@ static void sock_dead(struct dcerpc_pipe *p, NTSTATUS status) if (!NT_STATUS_IS_OK(status)) { p->transport.recv_data(p, NULL, status); } + + sock->fde->flags &= ~(EVENT_FD_WRITE | EVENT_FD_READ); } /* @@ -230,6 +232,10 @@ static NTSTATUS sock_send_request(struct dcerpc_pipe *p, DATA_BLOB *data, BOOL t struct sock_private *sock = p->transport.private; struct sock_blob *blob; + if (sock->sock == NULL) { + return NT_STATUS_CONNECTION_DISCONNECTED; + } + blob = talloc_p(sock, struct sock_blob); if (blob == NULL) { return NT_STATUS_NO_MEMORY; |