summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.c')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index e5272f0d3d1..c121210c478 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1531,11 +1531,6 @@ __socket_proto_state_machine (rpc_transport_t *this,
iobref = priv->incoming.iobref;
- iobref_add (iobref,
- priv->incoming.iobuf);
- iobuf_unref (priv->incoming.iobuf);
- priv->incoming.iobuf = NULL;
-
count++;
if (priv->incoming.payload_vector.iov_base
@@ -1548,8 +1543,12 @@ __socket_proto_state_machine (rpc_transport_t *this,
*pollin = rpc_transport_pollin_alloc (this,
vector,
count,
+ priv->incoming.iobuf,
iobref,
priv->incoming.request_info);
+ iobuf_unref (priv->incoming.iobuf);
+ priv->incoming.iobuf = NULL;
+
if (*pollin == NULL) {
ret = -1;
goto out;