[ovs-dev] [PATCH] Fix leak in patched_datapaths processing.

Flavio Fernandes flavio at flaviof.com
Thu Sep 1 15:24:19 UTC 2016


> On Sep 1, 2016, at 10:29 AM, Ryan Moats <rmoats at us.ibm.com> wrote:
> 
> When unpersisting patch_datapaths, missed that the key field
> needed to be freed to avoid a memory leak.  This patch fixes
> same.
> 
> Signed-off-by: Ryan Moats <rmoats at us.ibm.com>

Acked-by: Flavio Fernandes <flavio at flaviof.com>

> ---
> ovn/controller/ovn-controller.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
> index c2e667b..c4f02bc 100644
> --- a/ovn/controller/ovn-controller.c
> +++ b/ovn/controller/ovn-controller.c
> @@ -477,6 +477,7 @@ main(int argc, char *argv[])
>         HMAP_FOR_EACH_SAFE (pd_cur_node, pd_next_node, hmap_node,
>                 &patched_datapaths) {
>             hmap_remove(&patched_datapaths, &pd_cur_node->hmap_node);
> +            free(pd_cur_node->key);
>             free(pd_cur_node);
>         }
>         hmap_destroy(&patched_datapaths);
> --
> 2.7.4 (Apple Git-66)
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list