[PATCH OLK-5.10] ceph: prevent use-after-free in encode_cap_msg()