From e484ecbb21af1b0206d2efce7b03805480307281 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 28 Aug 2015 17:01:29 +0200 Subject: [PATCH] Check if host exist in finalize action --- src/dm/DispatchManagerActions.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dm/DispatchManagerActions.cc b/src/dm/DispatchManagerActions.cc index 08bdefdb34..019c3a639a 100644 --- a/src/dm/DispatchManagerActions.cc +++ b/src/dm/DispatchManagerActions.cc @@ -795,6 +795,12 @@ int DispatchManager::finalize( if(host_id != -1) { host = hpool->get(host_id,true); + if ( host == 0 ) + { + oss << "Error getting host " << host_id; + NebulaLog::log("DiM",Log::ERROR,oss); + return -1; + } is_public_host = host->is_public_cloud(); host->unlock(); }