[openib-general] [PATCH] OpenSM - Multiple Initializations of objects on startup

Jan Daley jdaley at systemfabricworks.com
Fri Aug 6 14:09:20 PDT 2004


Hi,

osm_subn_construct and cl_map_init(&(p_subn->opt.port_pro_ignore_guids),
10) are being called twice.  This causes some memory leaks.  


Index: opensm/osm_subnet.c
===================================================================
--- opensm/osm_subnet.c	(revision 590)
+++ opensm/osm_subnet.c	(working copy)
@@ -112,7 +112,6 @@
   cl_qmap_init( &p_subn->rtr_guid_tbl );
   cl_qmap_init( &p_subn->prtn_pkey_tbl );
   cl_qmap_init( &p_subn->mgrp_mlid_tbl );
-  cl_map_init(&(p_subn->opt.port_pro_ignore_guids), 10);
   cl_list_construct( &p_subn->new_ports_list );
   cl_list_init( &p_subn->new_ports_list, 10 );
 }
@@ -200,8 +199,6 @@
 {
   cl_status_t status;
 
-  osm_subn_construct( p_subn );
-
   status = cl_ptr_vector_init( &p_subn->node_lid_tbl,
                                OSM_SUBNET_VECTOR_MIN_SIZE,
                                OSM_SUBNET_VECTOR_GROW_SIZE );





Jan Daley
System Fabric Works
(512) 343-6101 x 13







More information about the general mailing list