소스 검색

Fix memleak

Samuel Thibault 4 년 전
부모
커밋
03af15f447
3개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      mpi/examples/mpi_lu/plu_example.c
  2. 2 0
      mpi/examples/mpi_lu/plu_implicit_example.c
  3. 1 0
      mpi/examples/mpi_lu/plu_outofcore_example.c

+ 2 - 0
mpi/examples/mpi_lu/plu_example.c

@@ -612,6 +612,8 @@ int main(int argc, char **argv)
 				starpu_free(blockptr);
 		}
 	}
+	free(dataA_handles);
+	free(dataA);
 
 	barrier_ret = MPI_Barrier(MPI_COMM_WORLD);
 	STARPU_ASSERT(barrier_ret == MPI_SUCCESS);

+ 2 - 0
mpi/examples/mpi_lu/plu_implicit_example.c

@@ -387,6 +387,8 @@ int main(int argc, char **argv)
 				starpu_free(blockptr);
 		}
 	}
+	free(dataA_handles);
+	free(dataA);
 
 	starpu_cublas_shutdown();
 	starpu_mpi_shutdown();

+ 1 - 0
mpi/examples/mpi_lu/plu_outofcore_example.c

@@ -410,6 +410,7 @@ int main(int argc, char **argv)
 			starpu_data_unregister(dataA_handles[j+nblocks*i]);
 		}
 	}
+	free(dataA_handles);
 
 	starpu_cublas_shutdown();
 	starpu_mpi_shutdown();