Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
struct translate_key transkey;
unsigned i;
- so = MALLOC(sizeof(*so) + sizeof(*so->element) * num_elements);
+ so = CALLOC(1, sizeof(*so) + sizeof(*so->element) * num_elements);
if (!so)
return NULL;
memcpy(so->pipe, elements, sizeof(*elements) * num_elements);
struct translate_key transkey;
unsigned i;
- so = MALLOC(sizeof(*so) +
+ so = CALLOC(1, sizeof(*so) +
num_elements * sizeof(struct nv50_vertex_element));
if (!so)
return NULL;
unsigned i;
unsigned src_offset_max = 0;
- so = MALLOC(sizeof(*so) +
+ so = CALLOC(1, sizeof(*so) +
num_elements * sizeof(struct nvc0_vertex_element));
if (!so)
return NULL;