diff mbox series

[ovs-dev,v2,3/3] ovn-northd: Fix memory leak in free_chassis_queueid().

Message ID 20181030220318.13998-3-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev,v2,1/3] ovn-northd: Use structure assignment instead of memcpy(). | expand

Commit Message

Ben Pfaff Oct. 30, 2018, 10:03 p.m. UTC
Found by inspection.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ovn/northd/ovn-northd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Numan Siddique Oct. 31, 2018, 5:30 p.m. UTC | #1
On Wed, Oct 31, 2018 at 3:36 AM Ben Pfaff <blp@ovn.org> wrote:

> Found by inspection.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
>

Acked-by: Numan Siddique <nusiddiq@redhat.com>


> ---
>  ovn/northd/ovn-northd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index 6cb0b6cc410a..e42ceea99264 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -393,6 +393,7 @@ free_chassis_queueid(struct hmap *set, struct
> sbrec_chassis *chassis,
>          if (uuid_equals(chassis_uuid, &node->chassis_uuid)
>              && node->queue_id == queue_id) {
>              hmap_remove(set, &node->key_node);
> +            free(node);
>              break;
>          }
>      }
> --
> 2.16.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Oct. 31, 2018, 5:56 p.m. UTC | #2
On Wed, Oct 31, 2018 at 11:00:15PM +0530, Numan Siddique wrote:
> On Wed, Oct 31, 2018 at 3:36 AM Ben Pfaff <blp@ovn.org> wrote:
> 
> > Found by inspection.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> >
> 
> Acked-by: Numan Siddique <nusiddiq@redhat.com>

Thanks for the reviews.  I applied both patches to master and backported
patch 3.
diff mbox series

Patch

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 6cb0b6cc410a..e42ceea99264 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -393,6 +393,7 @@  free_chassis_queueid(struct hmap *set, struct sbrec_chassis *chassis,
         if (uuid_equals(chassis_uuid, &node->chassis_uuid)
             && node->queue_id == queue_id) {
             hmap_remove(set, &node->key_node);
+            free(node);
             break;
         }
     }