mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Bug #1322: Do not create objects with negative ID
(cherry picked from commit c1d8dc72a4b90a290fa74903d4569ac33837aaf8)
This commit is contained in:
parent
4baaeb827d
commit
53d7982564
@ -168,6 +168,12 @@ PoolObjectSQL * PoolSQL::get(
|
||||
PoolObjectSQL * objectsql;
|
||||
int rc;
|
||||
|
||||
if ( oid < 0 )
|
||||
{
|
||||
objectsql = 0;
|
||||
return objectsql;
|
||||
}
|
||||
|
||||
lock();
|
||||
|
||||
index = pool.find(oid);
|
||||
@ -212,6 +218,7 @@ PoolObjectSQL * PoolSQL::get(
|
||||
|
||||
unlock();
|
||||
|
||||
objectsql = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user