summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2016-11-15 15:40:49 -0800
committerDaniele Di Proietto <diproiettod@vmware.com>2017-01-15 19:25:11 -0800
commit7c269972577da6aa3022216d754e9a86bb9461b5 (patch)
treef3572d291bffa07debe895f2d1198eb5aecec3ea /lib
parent871a38766b47f53160f743ba779f5d3a3c99aa04 (diff)
downloadopenvswitch-7c269972577da6aa3022216d754e9a86bb9461b5.tar.gz
dpif-netdev: Fix memory leak.
We keep all the per-port classifiers around, since they can be reused, but when a pmd thread is destroyed we should free them. Found using valgrind. Fixes: 3453b4d62a98("dpif-netdev: dpcls per in_port with sorted subtables") Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpif-netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 546a1e93f..32aa8d80e 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3349,6 +3349,7 @@ dp_netdev_destroy_pmd(struct dp_netdev_pmd_thread *pmd)
/* All flows (including their dpcls_rules) have been deleted already */
CMAP_FOR_EACH (cls, node, &pmd->classifiers) {
dpcls_destroy(cls);
+ ovsrcu_postpone(free, cls);
}
cmap_destroy(&pmd->classifiers);
cmap_destroy(&pmd->flow_table);