diff --git a/net/rds/send.c b/net/rds/send.c index 85c27d9aa33a..9a23f8f2bcfa 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1383,9 +1383,11 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) else queue_delayed_work(rds_wq, &cpath->cp_send_w, 1); rcu_read_unlock(); + + if (ret) + goto out; } - if (ret) - goto out; + rds_message_put(rm); for (ind = 0; ind < vct.indx; ind++)