[DVDnav-discuss] [PATCH] Free pointers regardless of related integers

Steve Dibb beandog at gentoo.org
Sat Jan 3 16:51:10 CET 2015


---
 src/ifo_read.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ifo_read.c b/src/ifo_read.c
index 807ebac..11ab661 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -797,11 +797,11 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t
*ifofile, 
 static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) {
   if(cmd_tbl) {
-    if(cmd_tbl->nr_of_pre && cmd_tbl->pre_cmds)
+    if(cmd_tbl->pre_cmds)
       free(cmd_tbl->pre_cmds);
-    if(cmd_tbl->nr_of_post && cmd_tbl->post_cmds)
+    if(cmd_tbl->post_cmds)
       free(cmd_tbl->post_cmds);
-    if(cmd_tbl->nr_of_cell && cmd_tbl->cell_cmds)
+    if(cmd_tbl->cell_cmds)
       free(cmd_tbl->cell_cmds);
     free(cmd_tbl);
   }
-- 
2.0.4


More information about the DVDnav-discuss mailing list