Commit 6e32e10e authored by Rémi Duraffort's avatar Rémi Duraffort

Fix memory leaks.

parent da2c2728
...@@ -1896,6 +1896,7 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, ...@@ -1896,6 +1896,7 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit,
ifoFree_PGC(pgcit->pgci_srp[j].pgc); ifoFree_PGC(pgcit->pgci_srp[j].pgc);
free(pgcit->pgci_srp[j].pgc); free(pgcit->pgci_srp[j].pgc);
} }
free(pgcit->pgci_srp[i].pgc);
goto fail; goto fail;
} }
} }
...@@ -1911,7 +1912,10 @@ static void ifoFree_PGCIT_internal(pgcit_t *pgcit) { ...@@ -1911,7 +1912,10 @@ static void ifoFree_PGCIT_internal(pgcit_t *pgcit) {
if(pgcit) { if(pgcit) {
int i; int i;
for(i = 0; i < pgcit->nr_of_pgci_srp; i++) for(i = 0; i < pgcit->nr_of_pgci_srp; i++)
{
ifoFree_PGC(pgcit->pgci_srp[i].pgc); ifoFree_PGC(pgcit->pgci_srp[i].pgc);
free(pgcit->pgci_srp[i].pgc);
}
free(pgcit->pgci_srp); free(pgcit->pgci_srp);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment