From: Arnaud Giersch Date: Fri, 22 Nov 2019 15:43:09 +0000 (+0100) Subject: Initialize allocated memory. X-Git-Tag: v3.25~366 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/15e4e16c71ae75d52935c66a4d8054a320beadae?hp=cbaf3d378e0b066dcac9ee64a804619e7ff3bd55 Initialize allocated memory. --- diff --git a/teshsuite/smpi/auto-shared/auto-shared.c b/teshsuite/smpi/auto-shared/auto-shared.c index 8966cc8f1a..e8a57f1e70 100644 --- a/teshsuite/smpi/auto-shared/auto-shared.c +++ b/teshsuite/smpi/auto-shared/auto-shared.c @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); //Let's Allocate a memory buffer - uint64_t* buf = malloc(sizeof(uint64_t)); + uint64_t* buf = calloc(1, sizeof(uint64_t)); //one writes data in it if(rank==0){ *buf=size;