st/oxr: Fix oversized allocation in binding code

This commit is contained in:
Ryan Pavlik 2019-12-02 17:15:46 -06:00
parent 4f6b4761cb
commit f20a0e14e0

View file

@ -205,9 +205,9 @@ interaction_profile_find_or_create(struct oxr_logger *log,
} }
// Add to the list of currently created interaction profiles. // Add to the list of currently created interaction profiles.
size_t size = U_ARRAY_REALLOC_OR_FREE(inst->profiles,
sizeof(struct oxr_interaction_profile) * (inst->num_profiles + 1); struct oxr_interaction_profile *,
inst->profiles = realloc(inst->profiles, size); (inst->num_profiles + 1));
inst->profiles[inst->num_profiles++] = p; inst->profiles[inst->num_profiles++] = p;
*out_p = p; *out_p = p;