[libdvdnav-devel] [PATCH] Free pointers regardless of related integers

Steve Dibb beandog at gentoo.org
Sat Jan 3 17:40:33 CET 2015


On Sat, 3 Jan 2015 17:35:45 +0100
Jean-Baptiste Kempf <jb at videolan.org> wrote:

> On 03 Jan, Steve Dibb wrote :
> > On Sat, 3 Jan 2015 17:02:41 +0100
> > Jean-Baptiste Kempf <jb at videolan.org> wrote:
> > 
> > OK.  What's the best approach?
> 
> free() directly, without if

Ok, awesome, thanks.

Ignore the previous patch.  I've got a new one coming soon that fixes
a segfault in another area as well.

I'm noticing already in the code that while freeing the pointers helps
in some cases, setting it to NULL also fixes other segfaults.  Since I
don't feel like following the logic completely at this point (and
because I'll eventually find them anyway), I'm just going to default to
setting freed pointers to NULL in any future patches.

Steve


More information about the libdvdnav-devel mailing list