net/cxgbe: fix null access when allocating CLIP entry

Pass correct arguments to CLIP allocation code to avoid NULL pointer
dereference.

Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
This commit is contained in:
Rahul Lakkireddy 2019-09-28 02:00:02 +05:30 committed by Ferruh Yigit
parent 71e9b334a2
commit 41b5a4a655

View File

@ -1052,7 +1052,7 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
*/
if (chip_ver > CHELSIO_T5 && fs->type &&
memcmp(fs->val.lip, bitoff, sizeof(bitoff))) {
f->clipt = cxgbe_clip_alloc(f->dev, (u32 *)&f->fs.val.lip);
f->clipt = cxgbe_clip_alloc(dev, (u32 *)&fs->val.lip);
if (!f->clipt)
goto free_tid;
}