git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto: Fix potential leak during flow mods.
[sliver-openvswitch.git]
/
lib
/
ofp-parse.c
diff --git
a/lib/ofp-parse.c
b/lib/ofp-parse.c
index
2ada88d
..
c759f03
100644
(file)
--- a/
lib/ofp-parse.c
+++ b/
lib/ofp-parse.c
@@
-1326,6
+1326,9
@@
parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
} else if (fields & F_FLAGS && !strcmp(name, "no_byte_counts")) {
fm->flags |= OFPUTIL_FF_NO_BYT_COUNTS;
*usable_protocols &= OFPUTIL_P_OF13_UP;
} else if (fields & F_FLAGS && !strcmp(name, "no_byte_counts")) {
fm->flags |= OFPUTIL_FF_NO_BYT_COUNTS;
*usable_protocols &= OFPUTIL_P_OF13_UP;
+ } else if (!strcmp(name, "no_readonly_table")
+ || !strcmp(name, "allow_hidden_fields")) {
+ /* ignore these fields. */
} else {
char *value;
} else {
char *value;
@@
-1921,7
+1924,7
@@
parse_ofp_flow_mod_file(const char *file_name, uint16_t command,
size_t i;
for (i = 0; i < *n_fms; i++) {
size_t i;
for (i = 0; i < *n_fms; i++) {
- free(
(*fms)[i].ofpacts
);
+ free(
CONST_CAST(struct ofpact *, (*fms)[i].ofpacts)
);
}
free(*fms);
*fms = NULL;
}
free(*fms);
*fms = NULL;