Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: [PATCH] svdrp for vdr-1.3.20



On Tuesday 08 February 2005 23:06, Klaus Schmidinger wrote:
> Stefan Taferner wrote:
> > On Tuesday 08 February 2005 12:30, Klaus Schmidinger wrote:
> >>Dr. Werner Fink wrote:
> >>>On Mon, Feb 07, 2005 at 11:01:29AM -0800, C.Y.M wrote:
> >>>>After running vdr-1.3.20, valgrind was complaining about the following
> >>>>line. Attached is a patch.
> >>>>
> >>>>Best Regards,
> >>>>C.Y.M.
> >>>>
> >>>>--- vdr-1.3.20/interface.c.orig      2004-11-01 06:23:28.000000000
> >>>> -0800 +++ vdr-1.3.20/interface.c 2005-02-05 14:33:05.000000000 -0800
> >>>> @@ -26,6 +26,7 @@
> >>>>
> >>>>cInterface::~cInterface()
> >>>>{
> >>>>+  if (SVDRP)
> >>>>  delete SVDRP;
> >>>
> >>>  +  SVDRP = NULL;
> >>>
> >>>I guess ;^)
> >>>
> >>>>}
> >>>
> >>>     Werner
> >>
> >>This pointer is 'private' in cInterface, so there is nothing that
> >>would access it after ~cInterface has run.
> >
> > Except if the interface is deleted twice
> > (had something like that in my software @work some days ago with valgrind
> > ;)
> >
> > --Stefan
>
> Which would be a programming error, anyway.
>
> Or are you implying that the Interface is actually being deleted twice?

I tried to imply nothing, but yes, if Werner is right it might be the 
cause :-)

In my case it was really a programming error. (a complex one, but an error
anyways ;)

Valgrind reported it like some members of the object where deleted the
wrong way, but they where actually deleted twice (in my case again).
Sometimes valgrind is like an oracle: you have to know how to interpret 
the things it says.

Kind regards,
Stefan




Home | Main Index | Thread Index