diff --git a/net/rds/send.c b/net/rds/send.c index dcb338339b71..d8280c25db7b 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1368,9 +1368,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++)