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 @@ free_flowid:
|
||||
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 @@ free_flowid:
|
||||
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