On Fri, May 15, 2020 at 5:22 PM Dumitru Ceara <dce...@redhat.com> wrote:
> On 5/15/20 12:17 PM, num...@ovn.org wrote: > > From: Numan Siddique <num...@ovn.org> > > > > Fixes the memory leak because of this. > > > > Signed-off-by: Numan Siddique <num...@ovn.org> > > Looks good to me. > > Acked-by: Dumitru Ceara <dce...@redhat.com> > Thanks Dumitru. I applied this patch to master and branch-20.03. Thanks Numan > > Thanks, > Dumitru > > > --- > > controller/binding.c | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/controller/binding.c b/controller/binding.c > > index 9d37a23cc..a5525a310 100644 > > --- a/controller/binding.c > > +++ b/controller/binding.c > > @@ -390,6 +390,17 @@ setup_qos(const char *egress_iface, struct hmap > *queue_map) > > netdev_close(netdev_phy); > > } > > > > +static void > > +destroy_qos_map(struct hmap *qos_map) > > +{ > > + struct qos_queue *qos_queue; > > + HMAP_FOR_EACH_POP (qos_queue, node, qos_map) { > > + free(qos_queue); > > + } > > + > > + hmap_destroy(qos_map); > > +} > > + > > static void > > update_local_lport_ids(struct sset *local_lport_ids, > > const struct sbrec_port_binding *binding_rec) > > @@ -792,7 +803,7 @@ binding_run(struct binding_ctx_in *b_ctx_in, struct > binding_ctx_out *b_ctx_out) > > > > shash_destroy(&lport_to_iface); > > sset_destroy(&egress_ifaces); > > - hmap_destroy(&qos_map); > > + destroy_qos_map(&qos_map); > > } > > > > /* Returns true if port-binding changes potentially require flow > changes on > > > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev