Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
still not our
[simgrid.git] / teshsuite / smpi / mpich3-test / datatype / tresized.c
index 069fddc..7b8c97e 100644 (file)
@@ -39,6 +39,7 @@ int main( int argc, char *argv[] )
        buf = (int *)malloc( count * 3 * sizeof(int) );
        if (!buf) {
            MPI_Abort( comm, 1 );
+            exit(1);
        }
        for (i=0; i<3*count; i++) buf[i] = -1;
        if (rank == source) {
@@ -70,7 +71,7 @@ int main( int argc, char *argv[] )
     }
 
     MPI_Type_free( &newtype );
-
+    free(buf);
     MTest_Finalize( errs );
     MPI_Finalize();
     return 0;