dpaa2-switch: Fix memory leak in dpaa2_switch_acl_entry_add() and dpaa2_switch_acl_en...
authorYuan Can <yuancan@huawei.com>
Mon, 5 Dec 2022 06:15:15 +0000 (06:15 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 7 Dec 2022 11:14:12 +0000 (12:14 +0100)
commit4fad22a1281c500f15b172c9d261eff347ca634b
tree0726f4d9014937234a56452686b9491c5fe74784
parent063a932b64db3317ec020c94466fe52923a15f60
dpaa2-switch: Fix memory leak in dpaa2_switch_acl_entry_add() and dpaa2_switch_acl_entry_remove()

The cmd_buff needs to be freed when error happened in
dpaa2_switch_acl_entry_add() and dpaa2_switch_acl_entry_remove().

Fixes: 1110318d83e8 ("dpaa2-switch: add tc flower hardware offload on ingress traffic")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221205061515.115012-1-yuancan@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-flower.c