diff mbox

[1/1] OpenSM: osm_ucast_dfsssp.c - prevent double free error

Message ID 1391516326-11399-1-git-send-email-domke.j.aa@m.titech.ac.jp (mailing list archive)
State Superseded
Delegated to: Hal Rosenstock
Headers show

Commit Message

Jens Domke Feb. 4, 2014, 12:18 p.m. UTC
an error in the routing execution can cause a second
free() call on sw_list, which results in a 'double free' error

Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>
---
 opensm/osm_ucast_dfsssp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Hal Rosenstock Feb. 4, 2014, 1:44 p.m. UTC | #1
On 2/4/2014 7:18 AM, Jens Domke wrote:
> an error in the routing execution can cause a second
> free() call on sw_list, which results in a 'double free' error
> 
> Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>

Thanks. Applied.

-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c
index 5eaff3d..ec69df0 100644
--- a/opensm/osm_ucast_dfsssp.c
+++ b/opensm/osm_ucast_dfsssp.c
@@ -2382,6 +2382,7 @@  static int dfsssp_do_dijkstra_routing(void *context)
 
 	/* the intermediate array lived long enough */
 	free(sw_list);
+	sw_list = NULL;
 	/* same is true for the compute node and I/O guid map */
 	destroy_guid_map(&cn_tbl);
 	cn_nodes_provided = FALSE;