summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi-Hung Wei <yihung.wei@gmail.com>2016-11-21 13:42:41 -0800
committerBen Pfaff <blp@ovn.org>2016-11-22 10:48:41 -0800
commita4b2c64f443935395632b040b0101541b732486d (patch)
tree07d43d7b6995f9885990a8386183ff1ebc020d1f
parent18dc96b0f1cd483ccf4718c112c9af340733dd62 (diff)
downloadopenvswitch-a4b2c64f443935395632b040b0101541b732486d.tar.gz
ovs-ofctl: Fix memory leak in bundle_print_errors().
In testcase "ofproto - bundle group mod with mod and add_or_mod command", valgrind reports a memory leak with the following call stack. xmalloc (util.c:112) ofpbuf_resize__ (ofpbuf.c:246) ofpbuf_push_uninit (ofpbuf.c:436) ofpbuf_push (ofpbuf.c:459) ofperr_decode_msg (ofp-errors.c:332) bundle_print_errors (ovs-ofctl.c:692) bundle_transact.constprop.25 (ovs-ofctl.c:728) bundle_group_mod__ (ovs-ofctl.c:2663) ofctl_group_mod__ (ovs-ofctl.c:2681) ofctl_group_mod (ovs-ofctl.c:2736) ovs_cmdl_run_command__ (command-line.c:115) main (ovs-ofctl.c:151) Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--utilities/ovs-ofctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 29b324b6d..7f5bb6161 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -714,6 +714,7 @@ bundle_print_errors(struct ovs_list *errors, struct ovs_list *requests)
fprintf(stderr, "Error %s for: ", ofperr_get_name(ofperr));
ofp_print(stderr, ofp_msg, msg_len, verbosity + 1);
}
+ ofpbuf_uninit(&payload);
free(error);
}
fflush(stderr);