1
1

Plug two memory leaks in rdma osc

Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
Этот коммит содержится в:
Joseph Schuchart 2018-11-14 14:31:54 -05:00
родитель 592e2cc0d9
Коммит 91885f5876
2 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -586,6 +586,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
}
}
if (0 == local_rank) {
/* allocate the shared memory segment */
ret = opal_asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_rdma.%s.%x.%d",
mca_osc_rdma_component.backing_directory, ompi_process_info.nodename,
@ -595,7 +596,6 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
break;
}
if (0 == local_rank) {
/* allocate enough space for the state + data for all local ranks */
ret = opal_shmem_segment_create (&module->seg_ds, data_file, total_size);
free (data_file);

Просмотреть файл

@ -111,7 +111,7 @@ int ompi_osc_rdma_free(ompi_win_t *win)
OBJ_DESTRUCT(&module->peer_hash);
} else if (NULL != module->comm) {
for (int i = 0 ; i < ompi_comm_rank (module->comm) ; ++i) {
for (int i = 0 ; i < ompi_comm_size (module->comm) ; ++i) {
if (NULL != module->peer_array[i]) {
OBJ_RELEASE(module->peer_array[i]);
}