[ovs-dev] [PATCH] bridge: Fix use-after-free in bridge_aa_refresh_queue().
Ben Pfaff
blp at nicira.com
Thu Apr 16 21:49:23 UTC 2015
Found by LLVM scan-build.
Reported-by: Kevin Lo <kevlo at FreeBSD.org>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
vswitchd/bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index ea7d788..ee96f38 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -3920,12 +3920,12 @@ static void
bridge_aa_refresh_queued(struct bridge *br)
{
struct ovs_list *list = xmalloc(sizeof *list);
- struct bridge_aa_vlan *node;
+ struct bridge_aa_vlan *node, *next;
list_init(list);
ofproto_aa_vlan_get_queued(br->ofproto, list);
- LIST_FOR_EACH(node, list_node, list) {
+ LIST_FOR_EACH_SAFE (node, next, list_node, list) {
struct port *port;
VLOG_INFO("ifname=%s, vlan=%u, oper=%u", node->port_name, node->vlan,
--
2.1.3
More information about the dev
mailing list