Преглед изворни кода

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

Nathalie Furmento пре 10 година
родитељ
комит
aa4a053d96
1 измењених фајлова са 1 додато и 1 уклоњено
  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 */