Hi, Attached patch fixes memory leak. It frees memory allocated dynamically
for QOS options while doing rescan of qos configuration file.
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index c41962d..3dab92f 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -374,8 +374,17 @@ static void subn_init_qos_options(IN
osm_qos_options_t * opt)
{
opt->max_vls = 0;
opt->high_limit = -1;
+ if (opt->vlarb_high != OSM_DEFAULT_QOS_VLARB_HIGH) {
+ free(opt->vlarb_high);
+ }
opt->vlarb_high = NULL;
+ if (opt->vlarb_low != OSM_DEFAULT_QOS_VLARB_LOW) {
+ free(opt->vlarb_low);
+ }
opt->vlarb_low = NULL;
+ if (opt->sl2vl != OSM_DEFAULT_QOS_SL2VL) {
+ free(opt->sl2vl);
+ }
opt->sl2vl = NULL;
}
Slava Strebkov
qos_options_free.patch
Description: qos_options_free.patch
_______________________________________________ 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
