projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26a55d7
)
ofproto: Avoid gratuitous memory allocation and free.
author
Ben Pfaff
<blp@nicira.com>
Sat, 7 Sep 2013 02:23:07 +0000
(19:23 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 13 Sep 2013 04:18:43 +0000
(21:18 -0700)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto.c
patch
|
blob
|
history
diff --git
a/ofproto/ofproto.c
b/ofproto/ofproto.c
index
6ca4573
..
622df5f
100644
(file)
--- a/
ofproto/ofproto.c
+++ b/
ofproto/ofproto.c
@@
-1741,10
+1741,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 =
CONST_CAST(struct ofpact *, ofpacts
);
fm.ofpacts_len = ofpacts_len;
add_flow(ofproto, NULL, &fm, NULL);
- free(fm.ofpacts);
}
}