[ofa-general] [PATCH] osm: fixing small memory leak

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Sun Apr 22 08:19:28 PDT 2007


Hi Hal,

This patch fixes a small memory leak - OpenSM was leaking ~200 bytes
or more for each guid in the fabric each time the guid2lid file was re-read.

Please apply to ofed_1_2 and trunk.

Thanks.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 osm/opensm/osm_lid_mgr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/osm/opensm/osm_lid_mgr.c b/osm/opensm/osm_lid_mgr.c
index bd5945f..d856fb0 100644
--- a/osm/opensm/osm_lid_mgr.c
+++ b/osm/opensm/osm_lid_mgr.c
@@ -247,6 +247,7 @@ __osm_lid_mgr_validate_db(
           cl_ptr_vector_set( &p_mgr->used_lids, lid, (void *)1);
       }
     } /* got a lid */
+    free(p_item);
     p_item = (osm_db_guid_elem_t*)cl_qlist_remove_head(&guids);
   } /* all guids */
  Exit:
-- 
1.4.4.1.GIT




More information about the general mailing list