X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b1801e7056930569752cf33757134cb44d32cfac..ebc355d0c96552d0bc2aa301d90723490337bca3:/src/surf/network_ib.cpp diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 97fd3e8bce..344cf11f0d 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ @@ -204,7 +204,6 @@ void NetworkIBModel::updateIBfactors(NetworkAction* action, IBNode* from, IBNode if (from == to) // disregard local comms (should use loopback) return; - ActiveComm* comm = nullptr; if (remove) { if (to->ActiveCommsDown[from] == 1) to->ActiveCommsDown.erase(from); @@ -214,7 +213,7 @@ void NetworkIBModel::updateIBfactors(NetworkAction* action, IBNode* from, IBNode to->nbActiveCommsDown--; for (std::vector::iterator it = from->ActiveCommsUp.begin(); it != from->ActiveCommsUp.end(); ++it) { if ((*it)->action == action) { - comm = (*it); + delete *it; from->ActiveCommsUp.erase(it); break; } @@ -234,7 +233,6 @@ void NetworkIBModel::updateIBfactors(NetworkAction* action, IBNode* from, IBNode std::vector updated(active_nodes.size(), false); updateIBfactors_rec(from, updated); XBT_DEBUG("IB - Finished updating %d", from->id); - delete comm; } } }