[ovs-dev] [leaks 1/5] ovsdb-idl: Fix memory leak writing synthetic rows in ovsdb_idl_txn_write().

Ben Pfaff blp at nicira.com
Wed Mar 28 16:17:34 PDT 2012


Thanks, pushed to master and branch-1.[56].  Not needed for earlier
branches.

On Wed, Mar 28, 2012 at 03:02:06PM -0700, Ethan Jackson wrote:
> Looks good, thanks.
> 
> Ethan
> 
> On Wed, Mar 28, 2012 at 14:58, Ben Pfaff <blp at nicira.com> wrote:
> > This could cause a slow but steady memory leak in ovs-vswitchd.
> >
> > Found by valgrind.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  lib/ovsdb-idl.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
> > index 19ae16f..5ad3f5c 100644
> > --- a/lib/ovsdb-idl.c
> > +++ b/lib/ovsdb-idl.c
> > @@ -1,4 +1,4 @@
> > -/* Copyright (c) 2009, 2010, 2011 Nicira Networks.
> > +/* Copyright (c) 2009, 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.
> > @@ -1718,6 +1718,7 @@ ovsdb_idl_txn_write(const struct ovsdb_idl_row *row_,
> >     size_t column_idx;
> >
> >     if (ovsdb_idl_row_is_synthetic(row)) {
> > +        ovsdb_datum_destroy(datum, &column->type);
> >         return;
> >     }
> >
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list