Mailing List archive

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

[vdr] Re: Coredump - vdr 1.3.9 at eit.c:205



"Prakash K. Cheemplavam" wrote:
> 
> Klaus Schmidinger wrote:
> > Philip Lawatsch wrote:
> 
> >>Should probably be
> >>
> >>       if (ExtendedEventDescriptors)
> >>         delete ExtendedEventDescriptors;
> >>       if (ShortEventDescriptor)
> >>         delete ShortEventDescriptor;
> >
> >
> > 'delete' is guaranteed to be "NULL-proof", so there's no need to check the
> > pointer first.
> 
> (While not having looked into the source) are both variables explicitly
> NULLed if not initialised? It is a common mistake to not do it, then the
> var holds a random value!=NULL and delete will go boom...
> 
> Prakash

      SI::ExtendedEventDescriptors *ExtendedEventDescriptors = NULL;
      SI::ShortEventDescriptor *ShortEventDescriptor = NULL;
      ...
      delete ExtendedEventDescriptors;
      delete ShortEventDescriptor;

Klaus




Home | Main Index | Thread Index