[ovs-dev] [PATCH] test-ovsdb: fix memory leak reported by valgrind.
William Tu
u9012063 at gmail.com
Fri Jan 22 17:41:39 UTC 2016
thanks, I will resubmit the patch.
On Fri, Jan 22, 2016 at 9:31 AM, Ben Pfaff <blp at ovn.org> wrote:
> I'd go ahead and free it. If we're wrong, valgrind will tell us about
> the invalid free.
>
> On Fri, Jan 22, 2016 at 08:45:28AM -0800, William Tu wrote:
> > I think so, too.
> > However, valgrind does not report any leak related to 'classes'. So I
> don't
> > have much confidence.
> >
> > On Fri, Jan 22, 2016 at 8:39 AM, Ben Pfaff <blp at ovn.org> wrote:
> >
> > > On Fri, Jan 22, 2016 at 08:29:27AM -0800, William Tu wrote:
> > > > Testcase 1311, 1312: Boolean-distinct queries on scalars, reports
> leak
> > > > below:
> > > > xmalloc (util.c:112)
> > > > do_query_distinct (test-ovsdb.c:1208)
> > > > ovs_cmdl_run_command (command-line.c:121)
> > > > main (test-ovsdb.c:72)
> > > >
> > > > Signed-off-by: William Tu <u9012063 at gmail.com>
> > > > ---
> > > > tests/test-ovsdb.c | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
> > > > index 15f41b0..7b774c2 100644
> > > > --- a/tests/test-ovsdb.c
> > > > +++ b/tests/test-ovsdb.c
> > > > @@ -1298,6 +1298,7 @@ do_query_distinct(struct ovs_cmdl_context *ctx)
> > > >
> > > > ovsdb_table_destroy(table); /* Also destroys 'ts'. */
> > > >
> > > > + free(rows);
> > > > exit(exit_code);
> > > > }
> > >
> > > Isn't the 'classes' variable in the same function also leaked?
> > >
>
More information about the dev
mailing list