[ovs-dev] [PATCH ovn] ovn-controller.c: Fix memory leak of local_datapath->ports.

Numan Siddique numans at ovn.org
Tue Oct 22 06:27:15 UTC 2019


On Tue, Oct 22, 2019 at 5:19 AM Han Zhou <hzhou at ovn.org> wrote:

> Fixes: 89f5048f960c ("ovn-controller: Minimize SB DB port_binding
> lookups.")
> Signed-off-by: Han Zhou <hzhou at ovn.org>
>

Acked-by: Numan Siddique <numans at ovn.org>

Numan


> ---
>  controller/ovn-controller.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index b46a1d1..9ab98be 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -972,6 +972,7 @@ en_runtime_data_cleanup(struct engine_node *node)
>      HMAP_FOR_EACH_SAFE (cur_node, next_node, hmap_node,
>                          &data->local_datapaths) {
>          free(cur_node->peer_ports);
> +        free(cur_node->ports);
>          hmap_remove(&data->local_datapaths, &cur_node->hmap_node);
>          free(cur_node);
>      }
> @@ -1002,6 +1003,7 @@ en_runtime_data_run(struct engine_node *node)
>          struct local_datapath *cur_node, *next_node;
>          HMAP_FOR_EACH_SAFE (cur_node, next_node, hmap_node,
> local_datapaths) {
>              free(cur_node->peer_ports);
> +            free(cur_node->ports);
>              hmap_remove(local_datapaths, &cur_node->hmap_node);
>              free(cur_node);
>          }
> --
> 2.1.0
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list