> From: zhangliping <[email protected]> > > We forgot to free the policer if rte_meter_srtcm_config failed, so memory > leak would happen. > > Fixes: 9509913aa722 ("netdev-dpdk.c: Add ingress-policing functionality.") > Signed-off-by: zhangliping <[email protected]> > --- > V2: Improve the commit log, and add the Fixes tag, suggested by Ian > Stokes. > > lib/netdev-dpdk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index > 364f545c4..770d6aca9 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -2251,6 +2251,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; > } >
Thanks Zhang, I've applied this to the DPDK_MERGE branch with a minor edit to the commit message. This patch can be backported to OVS 2.8, 2.7 and 2.6 as well, I can handle this. Thanks Ian > -- > 2.13.4 > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
