Thanks, pushed to master and branch-1.[456].

On Tue, Apr 24, 2012 at 01:06:02PM -0700, Ethan Jackson wrote:
> This patch fixes the leak for me and looks good, thanks.
> 
> Ethan
> 
> On Mon, Apr 23, 2012 at 13:24, Ben Pfaff <b...@nicira.com> wrote:
> > [adding ovs-dev]
> >
> > On Mon, Apr 23, 2012 at 11:07:28AM -0700, Ethan Jackson wrote:
> >> I'm doing 200 ports in a single transaction and seeing quite a bit of
> >> "definitely lost"  here's my valgrind output:
> >
> > Can you try it again with this patch?  Thanks.
> >
> > --8<--------------------------cut here-------------------------->8--
> >
> > From: Ben Pfaff <b...@nicira.com>
> > Date: Mon, 23 Apr 2012 13:22:10 -0700
> > Subject: [PATCH] Fix memory leaks.
> >
> > Found by valgrind.
> >
> > Reported-by: Ethan Jackson <et...@nicira.com>
> > Signed-off-by: Ben Pfaff <b...@nicira.com>
> > ---
> >  lib/netdev-vport.c |    3 ++-
> >  lib/route-table.c  |    5 ++++-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
> > index 7bd50a4..6a6cd51 100644
> > --- a/lib/netdev-vport.c
> > +++ b/lib/netdev-vport.c
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (c) 2010, 2011 Nicira Networks.
> > + * Copyright (c) 2010, 2011, 2012 Nicira Networks.
> >  *
> >  * Licensed under the Apache License, Version 2.0 (the "License");
> >  * you may not use this file except in compliance with the License.
> > @@ -198,6 +198,7 @@ netdev_vport_destroy(struct netdev_dev *netdev_dev_)
> >  {
> >     struct netdev_dev_vport *netdev_dev = 
> > netdev_dev_vport_cast(netdev_dev_);
> >
> > +    ofpbuf_delete(netdev_dev->options);
> >     route_table_unregister();
> >     free(netdev_dev);
> >  }
> > diff --git a/lib/route-table.c b/lib/route-table.c
> > index 58c1b60..8e54b28 100644
> > --- a/lib/route-table.c
> > +++ b/lib/route-table.c
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (c) 2011 Nicira Networks.
> > + * Copyright (c) 2011, 2012 Nicira Networks.
> >  *
> >  * Licensed under the Apache License, Version 2.0 (the "License");
> >  * you may not use this file except in compliance with the License.
> > @@ -246,6 +246,7 @@ route_table_reset(void)
> >     rtmsg->rtgen_family = AF_INET;
> >
> >     nl_dump_start(&dump, rtnl_sock, &request);
> > +    ofpbuf_uninit(&request);
> >
> >     while (nl_dump_next(&dump, &reply)) {
> >         struct route_table_msg msg;
> > @@ -437,6 +438,8 @@ name_table_reset(void)
> >     rtmsg->rtgen_family = AF_INET;
> >
> >     nl_dump_start(&dump, rtnl_sock, &request);
> > +    ofpbuf_uninit(&request);
> > +
> >     while (nl_dump_next(&dump, &reply)) {
> >         struct rtnetlink_link_change change;
> >
> > --
> > 1.7.2.5
> >
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to