[mythtv] [PATCH] mismatched delete [] in filtermanager [was: Re: Latest CVS Slow?]

Jim Radford radford+myth at blackbean.org
Fri Nov 14 13:49:29 EST 2003


On Fri, Nov 14, 2003 at 10:21:15AM -0800, Jim Radford wrote:
> On Fri, Nov 14, 2003 at 12:35:51PM -0500, Derek Atkins wrote:
> > Jim Radford <radford+myth at blackbean.org> writes:
> > 
> > > As crazy as it sounds, I have run mythtv under valgrind.  It found 
> > > a few memory leaks.  It might help here.
> > 
> > Could you send in some patches to correct them?
> 
> I did, of course!  I sent a bunch of them to Isaac directly since they
> were all fairly boring.  I even found and fixed two leaks in X itself
> during the exercise. :-)

This may not be a leak exactly, but...

Index: libs/libmythtv/filtermanager.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/filtermanager.cpp,v
retrieving revision 1.2
diff -u -r1.2 filtermanager.cpp
--- libs/libmythtv/filtermanager.cpp	8 Nov 2003 09:23:34 -0000	1.2
+++ libs/libmythtv/filtermanager.cpp	14 Nov 2003 18:45:51 -0000
@@ -70,7 +70,7 @@
         free(i.current()->name);
         free(i.current()->descript);
         free(i.current()->libname);
-        delete (i.current()->formats);
+        delete [] i.current()->formats;
         delete i.current();
     }
 }


More information about the mythtv-dev mailing list