mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/p: Fix allocation size error with realloc macro
This commit is contained in:
parent
f20a0e14e0
commit
808892742b
|
@ -280,9 +280,8 @@ add_device(struct prober *p, struct prober_device **out_dev)
|
|||
static void
|
||||
add_usb_entry(struct prober *p, struct xrt_prober_entry *entry)
|
||||
{
|
||||
size_t new_size =
|
||||
(p->num_entries + 1) * sizeof(struct xrt_prober_entry_usb *);
|
||||
p->entries = realloc(p->entries, new_size);
|
||||
U_ARRAY_REALLOC_OR_FREE(p->entries, struct xrt_prober_entry *,
|
||||
(p->num_entries + 1));
|
||||
p->entries[p->num_entries++] = entry;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue