[opensm patch 2/2] osm_opensm.c: destroy_routing_engines should destory the default routing engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
---
 opensm/osm_opensm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/opensm/osm_opensm.c b/opensm/osm_opensm.c
index be867fee..f73d0fa3 100644
--- a/opensm/osm_opensm.c
+++ b/opensm/osm_opensm.c
@@ -276,6 +276,13 @@ static void destroy_routing_engines(osm_opensm_t *osm)
 			r->destroy(r->context);
 		free(r);
 	}
+
+	r = osm->default_routing_engine;
+	if (r) {
+		if (r->destroy)
+			r->destroy(r->context);
+		free(r);
+	}
 }
 
 static void destroy_plugins(osm_opensm_t *osm)
-- 
2.19.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux