summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/rpc_server/dcerpc_server.c5
-rw-r--r--source4/rpc_server/dcerpc_sock.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 9373b06643..fd605fb955 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -907,7 +907,6 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
struct dcesrv_call_state *call;
struct dcesrv_call_reply *rep;
ssize_t nwritten;
- NTSTATUS status = NT_STATUS_OK;
call = dce_conn->call_list;
if (!call || !call->replies) {
@@ -928,8 +927,6 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
if (rep->data.length == 0) {
/* we're done with this section of the call */
DLIST_REMOVE(call->replies, rep);
- } else {
- status = STATUS_BUFFER_OVERFLOW;
}
if (call->replies == NULL) {
@@ -938,7 +935,7 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
talloc_free(call);
}
- return status;
+ return NT_STATUS_OK;
}
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index 32d1f0df35..508f42d2fb 100644
--- a/source4/rpc_server/dcerpc_sock.c
+++ b/source4/rpc_server/dcerpc_sock.c
@@ -39,7 +39,7 @@ static ssize_t dcerpc_write_fn(void *private, DATA_BLOB *out)
size_t sendlen;
status = socket_send(sock, out, &sendlen, 0);
- if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_IS_ERR(status)) {
return -1;
}
@@ -265,6 +265,7 @@ void dcesrv_sock_recv(struct server_connection *conn, time_t t, uint16_t flags)
return;
}
if (nread == 0) {
+ talloc_free(tmp_blob.data);
return;
}