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