mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-dpdk: fix ingress_policer leak on error path
Fix memory leak by freeing the policer if rte_meter_srtcm_config fails.
Fixes: 9509913aa7
("netdev-dpdk.c: Add ingress-policing functionality.")
Signed-off-by: zhangliping <zhangliping02@baidu.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
@@ -2436,6 +2436,7 @@ netdev_dpdk_policer_construct(uint32_t rate, uint32_t burst)
|
||||
&policer->app_srtcm_params);
|
||||
if (err) {
|
||||
VLOG_ERR("Could not create rte meter for ingress policer");
|
||||
free(policer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user