From dbb3cbb4c4eb1d9369c63e76c7c6ba9ee73948f2 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 13 Mar 2017 00:39:46 +0100 Subject: [PATCH] plug a memleak --- src/surf/sg_platf.cpp | 2 ++ src/surf/xml/surfxml_sax_cb.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 857c583068..4b239744c4 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -1,3 +1,4 @@ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -206,6 +207,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) xbt_dict_foreach(cluster->properties,cursor,key,data) { xbt_dict_set(host.properties, key, xbt_strdup(data), nullptr); } + xbt_dict_free(&cluster->properties); } host.speed_per_pstate = cluster->speeds; diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index ae13da939b..44f8c1d36e 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -1,5 +1,4 @@ - /* Copyright (c) 2006-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -- 2.20.1