From 2a3b85a892c3f6f90d5e828d1f406c3d39804023 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Fri, 16 Dec 2016 17:01:31 -0800 Subject: experts: remove delete after throw --- host/lib/experts/expert_container.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp index 1d945aa42..b9c78f9f5 100644 --- a/host/lib/experts/expert_container.cpp +++ b/host/lib/experts/expert_container.cpp @@ -294,11 +294,11 @@ protected: EX_LOG(0, str(boost::format("add_data_node(%s)") % data_node->get_name())); if (data_node->get_class() == CLASS_WORKER) { throw uhd::runtime_error("Supplied node " + data_node->get_name() + " is not a data/property node."); - delete data_node; + // Throw leaves data_node undeleted } if (_datanode_map.find(data_node->get_name()) != _datanode_map.end()) { throw uhd::runtime_error("Data node with name " + data_node->get_name() + " already exists"); - delete data_node; + // Throw leaves data node undeleted } try { @@ -335,11 +335,9 @@ protected: EX_LOG(0, str(boost::format("add_worker(%s)") % worker->get_name())); if (worker->get_class() != CLASS_WORKER) { throw uhd::runtime_error("Supplied node " + worker->get_name() + " is not a worker node."); - delete worker; } if (_worker_map.find(worker->get_name()) != _worker_map.end()) { throw uhd::runtime_error("Resolver with name " + worker->get_name() + " already exists."); - delete worker; } try { -- cgit v1.2.3