mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
ethernet: marvell: octeontx2 Fix resource not freed after malloc
fix rxsc and txsc not getting freed before going out of scope
Fixes: c54ffc7360 ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
Signed-off-by: Manank Patel <pmanank200502@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
aa1d7e1267
commit
7b55c2ed2b
|
|
@ -815,6 +815,7 @@ static struct cn10k_mcs_txsc *cn10k_mcs_create_txsc(struct otx2_nic *pfvf)
|
|||
cn10k_mcs_free_rsrc(pfvf, MCS_TX, MCS_RSRC_TYPE_FLOWID,
|
||||
txsc->hw_flow_id, false);
|
||||
fail:
|
||||
kfree(txsc);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
|
@ -870,6 +871,7 @@ static struct cn10k_mcs_rxsc *cn10k_mcs_create_rxsc(struct otx2_nic *pfvf)
|
|||
cn10k_mcs_free_rsrc(pfvf, MCS_RX, MCS_RSRC_TYPE_FLOWID,
|
||||
rxsc->hw_flow_id, false);
|
||||
fail:
|
||||
kfree(rxsc);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user