From 5db3065d63d02d15ea3e597e632376c35856c5e5 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 18 Feb 2015 16:41:56 +0900 Subject: [PATCH] fortran: fix misc memory leak in lookup_name as reported by Coverity with CID 1269897 --- ompi/mpi/fortran/mpif-h/lookup_name_f.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ompi/mpi/fortran/mpif-h/lookup_name_f.c b/ompi/mpi/fortran/mpif-h/lookup_name_f.c index 15ab2cfd8b..345d3eeb5f 100644 --- a/ompi/mpi/fortran/mpif-h/lookup_name_f.c +++ b/ompi/mpi/fortran/mpif-h/lookup_name_f.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -79,6 +81,7 @@ void ompi_lookup_name_f(char *service_name, MPI_Fint *info, c_port_name = (char *) malloc (port_name_len+1); if ( NULL == c_port_name ) { if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_ERR_OTHER); + free (c_service_name); return; }