Forráskód Böngészése

mpi/src/starpu_mpi.c: make sure all memory is initialised to 0

Nathalie Furmento 10 éve
szülő
commit
aa4a053d96
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      mpi/src/starpu_mpi.c

+ 1 - 1
mpi/src/starpu_mpi.c

@@ -85,7 +85,7 @@ extern int smpi_simulated_main_(int argc, char *argv[]);
 
 static void _starpu_mpi_request_init(struct _starpu_mpi_req **req)
 {
-	*req = malloc(sizeof(struct _starpu_mpi_req));
+	*req = calloc(1, sizeof(struct _starpu_mpi_req));
 	STARPU_MPI_ASSERT_MSG(*req, "Invalid request");
 
 	/* Initialize the request structure */