[PATCH 5.10 344/379] ceph: prevent use-after-free in encode_cap_msg()