From: Ben Pfaff Date: Sat, 7 Sep 2013 02:23:07 +0000 (-0700) Subject: ofproto: Avoid gratuitous memory allocation and free. X-Git-Tag: sliver-openvswitch-2.0.90-1~14^2~28 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=60967820a1d3aa1f987b1d73f87e9fddd9403650;p=sliver-openvswitch.git ofproto: Avoid gratuitous memory allocation and free. Signed-off-by: Ben Pfaff Acked-by: Ethan Jackson --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 3d5df24d9..3ae6cce57 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1752,10 +1752,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); } }