From 5c91f53848269a04888874558fdde0ee8a08c096 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 16 May 2008 03:27:42 +0000 Subject: [PATCH] Fix a minor memory leak This commit was SVN r18443. --- ompi/mca/btl/openib/btl_openib_component.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index 17353819ff..45ea731fb6 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -1025,6 +1025,7 @@ static int init_one_hca(opal_list_t *btl_list, struct ibv_device* ib_dev) port_cnt = get_port_list(hca, allowed_ports); if(0 == port_cnt) { ret = OMPI_SUCCESS; + free(allowed_ports); goto error; } #if HAVE_XRC @@ -1186,6 +1187,7 @@ static int init_one_hca(opal_list_t *btl_list, struct ibv_device* ib_dev) } } } + free(allowed_ports); /* If we made a BTL, we're done. Otherwise, fall through and destroy everything */