[libdvdnav-devel] [PATCH] Cleanup ifoFree()

Steve Dibb beandog at gentoo.org
Wed Jan 14 18:23:29 CET 2015


On Wed, 14 Jan 2015 10:19:37 -0700
beandog at gentoo.org wrote:

> From: Steve Dibb <steve.dibb at gmail.com>
> 
> - Move all ifoFree_*() functions only called once directly into
>   ifoFree()
> - Proper checks for NULL pointers, freeing pointers
> ---
>  src/dvdread/ifo_read.h |  13 +-
>  src/ifo_read.c         | 503
> ++++++++++++++++++++++++------------------------- 2 files changed,
> 244 insertions(+), 272 deletions(-)

Some clarifications / notes:

This also includes changes to some of the ifoRead_* functions as well.

The reason things are set to NULL either on closing some of the
functions is because both ifo_Read_* and ifo_Free_* functions will work
on partial amounts of data that is already populated.  Meaning, it's
important to always clean up after itself so that the other reads /
writes don't screw up.

Next in line is to cleanup all the Read functions, but for now it just
reassigns pointers to NULL.

Steve


More information about the libdvdnav-devel mailing list