diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c index 5c855d58b3..93eb864617 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c @@ -7,6 +7,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -797,7 +798,8 @@ ompi_osc_pt2pt_sendreq_recv_accum(ompi_osc_pt2pt_module_t *module, /* create convertor */ OBJ_CONSTRUCT(&convertor, ompi_convertor_t); - payload = (void*) malloc(buflen); + buffer = (void*) malloc(buflen); + if (NULL == buffer) return OMPI_ERR_TEMP_OUT_OF_RESOURCE; /* initialize convertor */ ompi_convertor_copy_and_prepare_for_recv(proc->proc_convertor,