In function qede_rss_reta_update(), the pointer params returned from
call to function rte_zmalloc() may be NULL and will be dereferenced.
So, should judge if the params is NULL or not.
Fixes:
8b3ee85efe11 ("net/qede: fix RSS table entries for 100G adapter")
Cc: stable@dpdk.org
Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Acked-by: Harish Patil <harish.patil@cavium.com>
memset(&vport_update_params, 0, sizeof(vport_update_params));
params = rte_zmalloc("qede_rss", sizeof(*params) * edev->num_hwfns,
RTE_CACHE_LINE_SIZE);
+ if (params == NULL) {
+ DP_ERR(edev, "failed to allocate memory\n");
+ return -ENOMEM;
+ }
for (i = 0; i < reta_size; i++) {
idx = i / RTE_RETA_GROUP_SIZE;