[PATCH 6.7 287/309] ceph: prevent use-after-free in encode_cap_msg()