ovs-ofctl: fix memory leak reported by valgrind.
Testcase 1057 ofproto-dpif - fragment handling - upcall reports
the following leak:
xrealloc (util.c:123)
vconn_dump_flows (vconn.c:1030)
read_flows_from_switch (ovs-ofctl.c:3360)
ofctl_replace_flows (ovs-ofctl.c:3433)
ovs_cmdl_run_command__ (command-line.c:115)
@@ -3375,6 +3375,11 @@ read_flows_from_switch(struct vconn *vconn,
fte_queue(state, &fs->match, fs->priority, version, index);
}
+
+ for (size_t i = 0; i < n_fses; i++) {
+ free(CONST_CAST(struct ofpact *, fses[i].ofpacts));
+ }
+ free(fses);
}
static void
