2
0
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:
zhangliping
2018-01-06 21:24:26 +08:00
committed by Ian Stokes
parent 1fb924b809
commit 4c47ddde34

View File

@@ -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;
}