On 12:44 Wed 10 Dec     , Robert Pearson wrote:
> 
> This patch implements
> 
>       - routine to reorder links and measure the size of the mesh

There are memory leaks - it allocates but doesn't free mesh->size and
node->coord. So I;m adding also the patch below.

Sasha

>From ec9daf997f22a4d63121a11a8dcde0ca1171b877 Mon Sep 17 00:00:00 2001
From: Sasha Khapyorsky <[email protected]>
Date: Sat, 20 Dec 2008 21:26:58 +0200
Subject: [PATCH] opensm/mesh: fix memory leaks

Fix memory leaks.

Signed-off-by: Sasha Khapyorsky <[email protected]>
---
 opensm/opensm/osm_mesh.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_mesh.c b/opensm/opensm/osm_mesh.c
index 4deb004..a0b6e1d 100644
--- a/opensm/opensm/osm_mesh.c
+++ b/opensm/opensm/osm_mesh.c
@@ -1172,6 +1172,9 @@ static void mesh_delete(mesh_t *mesh)
                if (mesh->class_count)
                        free(mesh->class_count);
 
+               if (mesh->size)
+                       free(mesh->size);
+
                free(mesh);
        }
 }
@@ -1239,6 +1242,9 @@ void osm_mesh_node_delete(lash_t *p_lash, switch_t *sw)
                if (node->axes)
                        free(node->axes);
 
+               if (node->coord)
+                       free(node->coord);
+
                free(node);
 
                sw->node = NULL;
-- 
1.6.0.4.766.g6fc4a

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to