Every iteration of the main loop allocated a new IPAM structure. Found by inspection.
Signed-off-by: Ben Pfaff <[email protected]> --- ovn/northd/ovn-northd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 74eefc6caeba..344b595ad3c1 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -539,7 +539,9 @@ init_ipam_info_for_datapath(struct ovn_datapath *od) const char *ipv6_prefix = smap_get(&od->nbs->other_config, "ipv6_prefix"); if (ipv6_prefix) { - od->ipam_info = xzalloc(sizeof *od->ipam_info); + if (!od->ipam_info) { + od->ipam_info = xzalloc(sizeof *od->ipam_info); + } od->ipam_info->ipv6_prefix_set = ipv6_parse( ipv6_prefix, &od->ipam_info->ipv6_prefix); } -- 2.16.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
