Message ID | 1358872753-16885-1-git-send-email-domke.j.aa@m.titech.ac.jp (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Alex Netes |
Headers | show |
diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c index ff525ea..013bad4 100644 --- a/opensm/osm_ucast_dfsssp.c +++ b/opensm/osm_ucast_dfsssp.c @@ -1161,6 +1161,11 @@ static int dfsssp_build_graph(void *context) OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR AD08: cannot allocate memory for a link\n"); dfsssp_context_destroy(context); + while (head) { + link = head; + head = head->next; + free(link); + } return 1; } link = link->next;