On Wed, Jul 8, 2020 at 8:33 PM Dumitru Ceara <[email protected]> wrote:
> The error string returned by ip_parse_masked() and ipv6_parse_masked() was
> not freed leading to a memory leak.
>
> Fixes: 32f5ebb06226 ("ovn-northd: Limit ARP/ND broadcast domain whenever
> possible.")
> Signed-off-by: Dumitru Ceara <[email protected]>
>
Thanks Dumitru.
I applied this patch to master, branch-20.06 and branch-20.03.
I didn't look into the patch 2 of the series. It would be great if Han or
Mark can take a look.
Thanks
Numan
> ---
> northd/ovn-northd.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index ddfcebe..4c23158 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -6243,13 +6243,17 @@ build_lswitch_rport_arp_req_flows(struct ovn_port
> *op,
> struct in6_addr ipv6;
> struct in6_addr mask_v6;
>
> - if (ip_parse_masked(nat->external_ip, &ip, &mask)) {
> - if (!ipv6_parse_masked(nat->external_ip, &ipv6, &mask_v6)) {
> + char *error = ip_parse_masked(nat->external_ip, &ip, &mask);
> + if (error) {
> + free(error);
> + error = ipv6_parse_masked(nat->external_ip, &ipv6, &mask_v6);
> + if (!error) {
> sset_add(&all_ips_v6, nat->external_ip);
> }
> } else {
> sset_add(&all_ips_v4, nat->external_ip);
> }
> + free(error);
> }
>
> if (!sset_is_empty(&all_ips_v4)) {
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev