aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ceph/messenger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index cad0d17ec45e..3ef1759403b4 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2750,7 +2750,8 @@ static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip)
2750 msg = con->ops->alloc_msg(con, hdr, skip); 2750 msg = con->ops->alloc_msg(con, hdr, skip);
2751 mutex_lock(&con->mutex); 2751 mutex_lock(&con->mutex);
2752 if (con->state != CON_STATE_OPEN) { 2752 if (con->state != CON_STATE_OPEN) {
2753 ceph_msg_put(msg); 2753 if (msg)
2754 ceph_msg_put(msg);
2754 return -EAGAIN; 2755 return -EAGAIN;
2755 } 2756 }
2756 con->in_msg = msg; 2757 con->in_msg = msg;