Message ID | 1353431984-11337-1-git-send-email-herton.krzesinski@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0de041f..692243a 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2746,7 +2746,8 @@ static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip) msg = con->ops->alloc_msg(con, hdr, skip); mutex_lock(&con->mutex); if (con->state != CON_STATE_OPEN) { - ceph_msg_put(msg); + if (msg) + ceph_msg_put(msg); return -EAGAIN; } con->in_msg = msg;