[ovs-dev] [ofp-print 01/15] ofproto: Fix write-after-free error in compose_nx_flow_removed().
Ben Pfaff
blp at nicira.com
Tue Dec 14 20:23:15 UTC 2010
---
ofproto/ofproto.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 8b52b80..5cd76df 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -4698,10 +4698,10 @@ compose_nx_flow_removed(const struct rule *rule, uint8_t reason)
struct ofpbuf *buf;
int match_len;
- nfr = make_nxmsg(sizeof *nfr, NXT_FLOW_REMOVED, &buf);
+ make_nxmsg(sizeof *nfr, NXT_FLOW_REMOVED, &buf);
match_len = nx_put_match(buf, &rule->cr);
-
+ nfr = buf->data;
nfr->cookie = rule->flow_cookie;
nfr->priority = htons(rule->cr.priority);
nfr->reason = reason;
--
1.7.1
More information about the dev
mailing list