[ovs-dev] [threaded-learning v2 05/25] ofproto: Avoid gratuitous memory allocation and free.
Ben Pfaff
blp at nicira.com
Thu Sep 12 07:39:17 UTC 2013
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>
---
ofproto/ofproto.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index c15c7aa..51ba326 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1750,10 +1750,9 @@ ofproto_add_flow(struct ofproto *ofproto, const struct match *match,
fm.match = *match;
fm.priority = priority;
fm.buffer_id = UINT32_MAX;
- fm.ofpacts = xmemdup(ofpacts, ofpacts_len);
+ fm.ofpacts = ofpacts;
fm.ofpacts_len = ofpacts_len;
add_flow(ofproto, NULL, &fm, NULL);
- free(fm.ofpacts);
}
}
--
1.7.10.4
More information about the dev
mailing list