Explorar o código

mpi/src/starpu_mpi.c: remove the object from hashtable before freeing it

Nathalie Furmento %!s(int64=12) %!d(string=hai) anos
pai
achega
7e4ee4f819
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mpi/src/starpu_mpi.c

+ 1 - 1
mpi/src/starpu_mpi.c

@@ -1473,8 +1473,8 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 			struct _starpu_mpi_copy_handle_hashlist *current, *tmp;
 			struct _starpu_mpi_copy_handle_hashlist *current, *tmp;
 			HASH_ITER(hh, _starpu_mpi_copy_handle_hashmap[n], current, tmp)
 			HASH_ITER(hh, _starpu_mpi_copy_handle_hashmap[n], current, tmp)
 			{
 			{
-				free(current);
 				HASH_DEL(_starpu_mpi_copy_handle_hashmap[n], current);
 				HASH_DEL(_starpu_mpi_copy_handle_hashmap[n], current);
+				free(current);
 			}
 			}
 		}
 		}
 	}
 	}