Feature #602: onevnet release returns error if a Lease is not used, this achieves the same behaviour for fixed and ranged networks

This commit is contained in:
Carlos Martín committed 2011-11-30 12:43:36 +01:00
1 parent ee6888567a
commit a173e7bd75
1 file changed
+1 -1
+1 -1
View File
@@ -490,7 +490,7 @@ int Leases::free_leases(vector<const Attribute*>& vector_leases,
it = leases.find(i_ip);
if ( it == leases.end() || (it->second->used && it->second->vid != -1) )
if ( it == leases.end() || !it->second->used || it->second->vid != -1 )
{
error_msg = "Lease is not on hold.";
return -1;