Commit 41c58a36 authored by Matthew Sakai's avatar Matthew Sakai Committed by Mike Snitzer

dm vdo indexer: fix use after free

Fixes: b46d79bd ("dm vdo: add deduplication index storage interface")
Reported-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent 7979d907
......@@ -1561,10 +1561,11 @@ static int __must_check load_index_save(struct index_save_layout *isl,
if (table->header.type != RH_TYPE_SAVE) {
uds_log_error_strerror(UDS_CORRUPT_DATA,
"unexpected index save %u header type %u",
instance, table->header.type);
vdo_free(table);
return uds_log_error_strerror(UDS_CORRUPT_DATA,
"unexpected index save %u header type %u",
instance, table->header.type);
return UDS_CORRUPT_DATA;
}
result = read_index_save_data(reader, isl, table->header.payload);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment