# HG changeset patch # User rathann # Date 1317934920 0 # Node ID 933bbcf893380e076820b0da7f27f564007f4cb5 # Parent 99af5ed114a4416fddbc8470d7786aec772e7b75 Fix memory leaks. Patch by Rmi Duraffort ^ivoire#videolan*org! diff -r 99af5ed114a4 -r 933bbcf89338 ifo_read.c --- a/ifo_read.c Thu Oct 06 12:10:01 2011 +0000 +++ b/ifo_read.c Thu Oct 06 21:02:00 2011 +0000 @@ -1896,6 +1896,7 @@ ifoFree_PGC(pgcit->pgci_srp[j].pgc); free(pgcit->pgci_srp[j].pgc); } + free(pgcit->pgci_srp[i].pgc); goto fail; } } @@ -1911,7 +1912,10 @@ if(pgcit) { int i; for(i = 0; i < pgcit->nr_of_pgci_srp; i++) + { ifoFree_PGC(pgcit->pgci_srp[i].pgc); + free(pgcit->pgci_srp[i].pgc); + } free(pgcit->pgci_srp); } }