@@ -6138,6 +6138,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct hmap *lflows)
if (!(!od->nbs || !od->nbs->n_forwarding_groups)) {
struct ds match = DS_EMPTY_INITIALIZER;
struct ds actions = DS_EMPTY_INITIALIZER;
+ struct ds group_ports = DS_EMPTY_INITIALIZER;
for (int i = 0; i < od->nbs->n_forwarding_groups; ++i) {
const struct nbrec_forwarding_group *fwd_group = NULL;
@@ -6171,7 +6172,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct hmap *lflows)
ds_put_format(&match, "eth.dst == %s", fwd_group->vmac);
/* Create a comma separated string of child ports */
- struct ds group_ports = DS_EMPTY_INITIALIZER;
+ ds_clear(&group_ports);
if (fwd_group->liveness) {
ds_put_cstr(&group_ports, "liveness=\"true\",");
}
@@ -6192,6 +6193,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct hmap *lflows)
ds_destroy(&match);
ds_destroy(&actions);
+ ds_destroy(&group_ports);
}
}
'group_ports' never destroyed and re-created on each iteration. CC: Manoj Sharma <manoj.sharma@nutanix.com> Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness detection") Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- northd/ovn-northd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)