diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2016-11-21 13:42:39 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-11-22 10:41:38 -0800 |
commit | 5a329e85d6489b8c9fa8e573912f6179fde1f701 (patch) | |
tree | 22f302420591345f1c309b141f74208439f0540b /utilities | |
parent | 58d636ee831a248dd0b740bba38ece43d27fc995 (diff) | |
download | openvswitch-5a329e85d6489b8c9fa8e573912f6179fde1f701.tar.gz |
ovs-ofctl: Fix memory leak in ofctl_packet_out().
In testcase "bfd - bfd decay", valgrind reports a memory leak with the
following call stack.
xmalloc (util.c:112)
vconn_stream_new (vconn-stream.c:60)
vconn_stream_open (vconn-stream.c:85)
vconn_open (vconn.c:248)
open_vconn_socket (ovs-ofctl.c:517)
open_vconn__ (ovs-ofctl.c:553)
open_vconn (ovs-ofctl.c:587)
open_vconn_for_flow_mod (ovs-ofctl.c:1416)
ofctl_packet_out (ovs-ofctl.c:2148)
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>
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/ovs-ofctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 4b8a43c99..29b324b6d 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -2149,6 +2149,7 @@ ofctl_packet_out(struct ovs_cmdl_context *ctx) usable_protocols); opo = ofputil_encode_packet_out(&po, protocol); transact_noreply(vconn, opo); + vconn_close(vconn); free(CONST_CAST(void *, po.packet)); free(po.ofpacts); } else { |