[ovs-dev] [PATCH] netdev-dpdk: fix ingress_policer leak on error path

zhangliping zhanglkk1990 at 163.com
Fri Dec 29 06:55:27 UTC 2017


From: zhangliping <zhangliping02 at baidu.com>

Signed-off-by: zhangliping <zhangliping02 at baidu.com>
---
 lib/netdev-dpdk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 8f22264b3..a3eb3c720 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2258,6 +2258,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;
     }
 
-- 
2.13.4




More information about the dev mailing list