From: Ben Pfaff <blp@nicira.com>
Date: Thu, 3 Mar 2011 17:54:33 +0000 (-0800)
Subject: wdp-xflow: Remove wx structure from global list when closing.
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2f436da3b23102b91b020e9a7a3001147fc89832;p=sliver-openvswitch.git

wdp-xflow: Remove wx structure from global list when closing.

Fixes a use-after-free error in wx_run().

Reported-by: Hao Zheng <hzheng@nicira.com>
---

diff --git a/ofproto/wdp-xflow.c b/ofproto/wdp-xflow.c
index 09cdc7dee..0cc6fc7fa 100644
--- a/ofproto/wdp-xflow.c
+++ b/ofproto/wdp-xflow.c
@@ -1386,6 +1386,7 @@ wx_close(struct wdp *wdp)
 {
     struct wx *wx = wx_cast(wdp);
 
+    list_remove(&wx->list_node);
     wx_flow_flush(wdp);
     xfif_close(wx->xfif);
     classifier_destroy(&wx->cls);