Avoid dereferencing a null pointer.
Fixes:
313ac35ac701 ("net/bnxt: support ULP session manager init")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
return 0;
mem_error:
- rte_free(mark_tbl->gfid_tbl);
- rte_free(mark_tbl->lfid_tbl);
- rte_free(mark_tbl);
+ if (mark_tbl) {
+ rte_free(mark_tbl->gfid_tbl);
+ rte_free(mark_tbl->lfid_tbl);
+ rte_free(mark_tbl);
+ }
BNXT_TF_DBG(DEBUG, "Failed to allocate memory for mark mgr\n");
return -ENOMEM;
}