]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/reduce-scatter-gather.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mem leak
[simgrid.git] / src / smpi / colls / reduce-scatter-gather.c
index 280e3e8f3f6778ceb28f94107bd66c43f919df13..2c61d48f65c969699297b39c976ad882c9abe644 100644 (file)
@@ -41,7 +41,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
     send_ptr = (void *) xbt_malloc(new_count * extent);
     recv_ptr = (void *) xbt_malloc(new_count * extent);
     tmp_buf = (void *) xbt_malloc(new_count * extent);
-    memcpy(send_ptr, sendbuf, extent * new_count);
+    memcpy(send_ptr, sendbuf, extent * count);
 
     //if ((rank != root))
     smpi_mpi_sendrecv(send_ptr, new_count, datatype, rank, tag,