Skip to content

Commit

Permalink
Fix use of mesh after deallocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Algiane committed Feb 29, 2024
1 parent 20f3e60 commit fc90279
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/hex2tet.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,19 @@ int main(int argc,char *argv[]) {
if ( mmgMesh->info.imprim > 0 )
fprintf(stdout," -- WRITING COMPLETED. %fs\n",tim);

/** free structures */
H2T_Free_all(MMG5_ARG_start,
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
H2T_ARG_phexa,&hexa,
MMG5_ARG_end);

t_end = clock();
tim = (float)(t_end-t_start)/CLOCKS_PER_SEC;

if ( mmgMesh->info.imprim >= 0 ) {
fprintf(stdout, "\n END OF MODULE HEX2TET: TOTAL TIME %fs\n", tim);
}

/** free structures */
H2T_Free_all(MMG5_ARG_start,
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
H2T_ARG_phexa,&hexa,
MMG5_ARG_end);


return ier;
}

0 comments on commit fc90279

Please sign in to comment.