提交 4a32f93d 编写于 作者: S Sage Weil

ceph: fix map handler error path

Don't leak message if we receive an unexpected message type.
Signed-off-by: NSage Weil <sage@newdream.net>
上级 0cf5537b
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册