Commit b23183a7 authored by William Tu's avatar William Tu Committed by Ben Pfaff

ovs-ofctl: Fix memory leak reported by valgrind.

Reported by 348: ovs-ofctl parse-flows (skb_priority)
Reason: return without freeing memory
Signed-off-by: default avatarWilliam Tu <>
Signed-off-by: default avatarDaniele Di Proietto <>
Co-authored-by: default avatarDaniele Di Proietto <>
Signed-off-by: default avatarBen Pfaff <>
parent 362d9418
......@@ -955,6 +955,7 @@ parse_ofp_flow_mod_file(const char *file_name, int command,
error = parse_ofp_flow_mod_str(&(*fms)[*n_fms], ds_cstr(&s), command,
if (error) {
char *err_msg;
size_t i;
for (i = 0; i < *n_fms; i++) {
......@@ -969,7 +970,9 @@ parse_ofp_flow_mod_file(const char *file_name, int command,
return xasprintf("%s:%d: %s", file_name, line_number, error);
err_msg = xasprintf("%s:%d: %s", file_name, line_number, error);
return err_msg;
*usable_protocols &= usable; /* Each line can narrow the set. */
*n_fms += 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment