diff options
author | Sage Weil <sage@newdream.net> | 2010-06-13 10:27:53 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-06-13 10:34:36 -0700 |
commit | 4a32f93d29b05cdab63c0e2979bc1524c8ea6bf5 (patch) | |
tree | 381f3bac8bb564a4666f48a0d6d459b0a2bbbba7 /fs | |
parent | 0cf5537b158caae42bcc03f0f6db10f68585b1ec (diff) | |
download | op-kernel-dev-4a32f93d29b05cdab63c0e2979bc1524c8ea6bf5.zip op-kernel-dev-4a32f93d29b05cdab63c0e2979bc1524c8ea6bf5.tar.gz |
ceph: fix map handler error path
Don't leak message if we receive an unexpected message type.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/osd_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index d25b4ad..92b7251 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c @@ -1344,7 +1344,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg) int type = le16_to_cpu(msg->hdr.type); if (!osd) - return; + goto out; osdc = osd->o_osdc; switch (type) { @@ -1359,6 +1359,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg) pr_err("received unknown message type %d %s\n", type, ceph_msg_type_name(type)); } +out: ceph_msg_put(msg); } |