1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Check ImageManagerDriver in stat function. It prevents oned seg fault when the DS driver is not loaded

This commit is contained in:
Ruben S. Montero 2012-11-02 17:16:00 +01:00
parent 3bf129a17d
commit 15d34893c0

View File

@ -669,6 +669,13 @@ int ImageManager::stat_image(Template* img_tmpl,
int rc = 0;
if ( imd == 0 )
{
res = "Could not get datastore driver";
NebulaLog::log("ImM",Log::ERROR, res);
return -1;
}
img_tmpl->get("TYPE", type_att);
switch (Image::str_to_type(type_att))