The size of unit cache should be sizeof(**cache) instead of
sizeof(*cache). Memory reallocation is inadequate by sizeof(*cache)
for the platform whose size of pointer is 32-bits. Found by coccinelle
(see https://coccinelle.gitlabpages.inria.fr/website) script.
Fixes: 63abf8d29225 ("net/sfc: support SW stats groups")
Cc: stable@dpdk.org
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
memset(*reset_vals, 0, nb_supported * sizeof(**reset_vals));
- *cache = rte_realloc(*cache, cache_count * sizeof(*cache), 0);
+ *cache = rte_realloc(*cache, cache_count * sizeof(**cache), 0);
if (*cache == NULL) {
rc = ENOMEM;
goto fail_cache;