Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn-full] svn:open-mpi r18748
From: Tim Mattox (timattox_at_[hidden])
Date: 2008-06-26 09:58:35


This doesn't look right. Either remote_pml at this point might be NULL
and needs to be checked before calling free(remote_pml), or it is
guaranteed to not be NULL and the two NULL checks a few lines
above this change should be removed.

On Thu, Jun 26, 2008 at 9:31 AM, <rhc_at_[hidden]> wrote:
> Author: rhc
> Date: 2008-06-26 09:31:36 EDT (Thu, 26 Jun 2008)
> New Revision: 18748
> URL: https://svn.open-mpi.org/trac/ompi/changeset/18748
>
> Log:
> May be picky, but cleanup before returning in error conditions
>
> Text files modified:
> trunk/ompi/mca/pml/base/pml_base_select.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> Modified: trunk/ompi/mca/pml/base/pml_base_select.c
> ==============================================================================
> --- trunk/ompi/mca/pml/base/pml_base_select.c (original)
> +++ trunk/ompi/mca/pml/base/pml_base_select.c 2008-06-26 09:31:36 EDT (Thu, 26 Jun 2008)
> @@ -372,6 +372,7 @@
> my_pml, ORTE_NAME_PRINT(&procs[0]->proc_name),
> (NULL == remote_pml) ? "NULL" : remote_pml);
> }
> + free(remote_pml); /* cleanup before returning */
> return OMPI_ERR_UNREACH;
> }
>
> _______________________________________________
> svn-full mailing list
> svn-full_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full
>

-- 
Tim Mattox, Ph.D. - http://homepage.mac.com/tmattox/
 tmattox_at_[hidden] || timattox_at_[hidden]
 I'm a bright... http://www.the-brights.net/