summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/rpc_transport_np.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index 501aa50b03..623a8b37cf 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -180,6 +180,12 @@ static void rpc_np_read_done(struct tevent_req *subreq)
return;
}
+ if (state->received == 0) {
+ TALLOC_FREE(subreq);
+ tevent_req_nterror(req, NT_STATUS_PIPE_BROKEN);
+ return;
+ }
+
memcpy(state->data, rcvbuf, state->received);
TALLOC_FREE(subreq);
tevent_req_done(req);