projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
in-band: Fix memory leak in in_band_destroy().
[openvswitch]
/
lib
/
dpif.c
diff --git
a/lib/dpif.c
b/lib/dpif.c
index 8e5cf9ffcb36af7650f6485a46456b9289907e45..186f165c1745558883b4e8fed88874433e4cec04 100644
(file)
--- a/
lib/dpif.c
+++ b/
lib/dpif.c
@@
-724,6
+724,11
@@
dpif_flow_get(const struct dpif *dpif, struct odp_flow *flow)
if (!error) {
error = flow->stats.error;
}
if (!error) {
error = flow->stats.error;
}
+ if (error) {
+ /* Make the results predictable on error. */
+ memset(&flow->stats, 0, sizeof flow->stats);
+ flow->n_actions = 0;
+ }
if (should_log_flow_message(error)) {
log_flow_operation(dpif, "flow_get", error, flow);
}
if (should_log_flow_message(error)) {
log_flow_operation(dpif, "flow_get", error, flow);
}