[PATCH 6.6 239/331] ceph: prevent use-after-free in encode_cap_msg()