Commit 7b56f69580e1f390d9c6753a2cb8f0dbfbb4c467 cloned the external_ids
to ids, then passed them to sbrec_port_binding_set_external_ids().
The intermediate step is unneeded (and caused a memory leak).
Pass the external_ids directly.

Signed-off-by: Olaf Seibert <[email protected]>
---
 northd/northd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 09eccf4d9..309b449dd 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -3435,9 +3435,7 @@ ovn_port_update_sbrec(struct northd_input *input_data,
         sbrec_port_binding_set_mac(op->sb, &addresses, 1);
         ds_destroy(&s);
 
-        struct smap ids = SMAP_INITIALIZER(&ids);
-        smap_clone(&ids, &op->nbrp->external_ids);
-        sbrec_port_binding_set_external_ids(op->sb, &ids);
+        sbrec_port_binding_set_external_ids(op->sb, &op->nbrp->external_ids);
 
         sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0);
     } else {
-- 
2.37.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to