netdev-dpdk: fix ingress_policer leak on error path
Fix memory leak by freeing the policer if rte_meter_srtcm_config fails.
Fixes: ("netdev-dpdk.c: Add ingress-policing functionality.")
@@ -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;
}
