diff options
author | Mark Michelson <mmichels@redhat.com> | 2017-07-14 14:27:24 -0500 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-07-14 14:45:16 -0700 |
commit | 747c31c94d629274af55f89c4903d62b100ded7a (patch) | |
tree | a6174f8ee19107bba4a0a858e62d3dfe0bf983b7 /vtep | |
parent | feb86b41fbca77ec466ffbd29d8b47486103b459 (diff) | |
download | openvswitch-747c31c94d629274af55f89c4903d62b100ded7a.tar.gz |
Free port bindings when deleting cached ports.
Running test "ovn-controller-vtep binding 2" with address sanitizer
enabled resulted in a failure due to a memory leak. The cached switch
port's bindings were not being freed when the port was freed. The
fix is to destroy the bindings hash table when the switch port is
freed.
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Reported-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'vtep')
-rw-r--r-- | vtep/vtep-ctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index bbdf57fad..17afa0c59 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -542,6 +542,7 @@ del_cached_port(struct vtep_ctl_context *vtepctl_ctx, ovs_list_remove(&port->ports_node); shash_find_and_delete(&vtepctl_ctx->ports, cache_name); vteprec_physical_port_delete(port->port_cfg); + shash_destroy(&port->bindings); free(cache_name); free(port); } |