@@ -313,6 +313,7 @@ static int parse_reply_info_lease(void **p, void *end,
{
u8 struct_v;
u32 struct_len;
+ void *lend;
if (features == (u64)-1) {
u8 struct_compat;
@@ -332,6 +333,7 @@ static int parse_reply_info_lease(void **p, void *end,
*altname = NULL;
}
+ lend = *p + struct_len;
ceph_decode_need(p, end, struct_len, bad);
*lease = *p;
*p += sizeof(**lease);
@@ -347,6 +349,7 @@ static int parse_reply_info_lease(void **p, void *end,
*altname_len = 0;
}
}
+ *p = lend;
return 0;
bad:
return -EIO;