changeset 71:df32da8e44b1 src

Make sure vts_ptt_srpt->title is freed title was being leaked when the error path is hit in this function.
author erik
date Sat, 13 Aug 2011 17:28:48 +0000
parents f6cd5131324d
children 99af5ed114a4
files ifo_read.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ifo_read.c	Sat Aug 13 17:28:45 2011 +0000
+++ b/ifo_read.c	Sat Aug 13 17:28:48 2011 +0000
@@ -1160,6 +1160,7 @@
   if(!vts_ptt_srpt)
     return 0;
 
+  vts_ptt_srpt->title = NULL;
   ifofile->vts_ptt_srpt = vts_ptt_srpt;
 
   if(!(DVDReadBytes(ifofile->file, vts_ptt_srpt, VTS_PTT_SRPT_SIZE))) {
@@ -1257,6 +1258,7 @@
 fail:
   free(data);
   ifofile->vts_ptt_srpt = 0;
+  free(vts_ptt_srpt->title);
   free(vts_ptt_srpt);
   return 0;
 }