[libdvdnav-devel] [PATCH] Set all freed pointers to NULL; for ifofiles, set pointers to NULL instead of zero

Steve Dibb beandog at gentoo.org
Mon Jan 5 00:24:59 CET 2015


On Sat, 3 Jan 2015 21:15:50 +0000
Andrew Clayton <andrew at digital-domain.net> wrote:

> On Sat, 3 Jan 2015 11:00:30 -0700, Steve Dibb wrote:
> 
> > ---
> >  src/ifo_read.c | 197
> > +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file
> > changed, 148 insertions(+), 49 deletions(-)
> > 
> > diff --git a/src/ifo_read.c b/src/ifo_read.c
> > index 807ebac..bc26c4d 100644
> > --- a/src/ifo_read.c
> > +++ b/src/ifo_read.c
> > @@ -374,6 +374,7 @@ ifoOpen_try_bup:
> >    if (!ifofile->file) {
> >      fprintf(stderr, "libdvdread: Can't open file %s.\n",
> > ifo_filename); free(ifofile);
> > +    ifofile = NULL;
> >      return NULL;
> >    }
> 
> Hi Steve.
> 
> Could you remind why we need to do this?
> 
> I haven't looked at all the places in your patch, but at least this
> one seems to have no effect.

Yah, jb explained it to me, and that's not necessary.  I've got a new
patch that I'll throw together.

I'm having a hard time figuring out git, though.  I had my own branch
that I created, did that commit to it, but I don't understand how to
make changes to that commit so I only have one patch to create.

Steve


More information about the libdvdnav-devel mailing list