Merge branch 'kl/attr-read-attr-fromindex-msan-workaround'

Code clarification to avoid an appearance of using an uninitialized
variable.

* kl/attr-read-attr-fromindex-msan-workaround:
  attr: fix msan issue in read_attr_from_index
This commit is contained in:
Junio C Hamano 2024-06-24 16:39:15 -07:00
commit 532083fd16

3
attr.c
View file

@ -865,7 +865,8 @@ static struct attr_stack *read_attr_from_index(struct index_state *istate,
stack = read_attr_from_blob(istate, &istate->cache[sparse_dir_pos]->oid, relative_path, flags);
} else {
buf = read_blob_data_from_index(istate, path, &size);
stack = read_attr_from_buf(buf, size, path, flags);
if (buf)
stack = read_attr_from_buf(buf, size, path, flags);
}
return stack;
}