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

Andrew Clayton andrew at digital-domain.net
Sat Jan 3 22:15:50 CET 2015


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.

Cheers,
Andrew


More information about the libdvdnav-devel mailing list