On Tue, 28 Nov 2023 14:07:41 +0000 Euan Bourke <euan.bou...@intel.com> wrote:
> +int > +rte_parse_corelist(const char *corelist, uint16_t *cores, uint32_t cores_len) > +{ > + int32_t min = -1; > + char *end = NULL; > + > + struct core_bits *mask = malloc(sizeof(struct core_bits)); > + if (mask == NULL) > + return -1; > + memset(mask, 0, sizeof(struct core_bits)); > + The structure is not variable size, and small, why bother using malloc(). Just use on stack structure.