Skip to content

Commit

Permalink
ceph: fix map handler error path
Browse files Browse the repository at this point in the history
Don't leak message if we receive an unexpected message type.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Jun 13, 2010
1 parent 0cf5537 commit 4a32f93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}

Expand Down

0 comments on commit 4a32f93

Please sign in to comment.