mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Look for null pointer on account id before trying to update usage when releasing
an IP. This seems to be possible if expunge fails at some point after freeing an IP, on subsequent expunge tries the IP is freed already and gets null pointer when looking for account id. BUG-ID: CLOUDSTACK-2279 Bugfix-for: 4.1,4.2 Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1367251304 -0600
This commit is contained in:
parent
8545e68aaf
commit
a0dbf89090
@ -2886,7 +2886,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
|
||||
}
|
||||
|
||||
// Save usage event
|
||||
if (ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
|
||||
if (ip.getAllocatedToAccountId() != null && ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
|
||||
VlanVO vlan = _vlanDao.findById(ip.getVlanId());
|
||||
|
||||
String guestType = vlan.getVlanType().toString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user