mirror of https://github.com/apache/cloudstack.git
Fix for CS-15345
During account cleanup, associated network is accessed without checking whether it is present or not. Added a check to use it only when present.
This commit is contained in:
parent
079d7ef1aa
commit
a8c1568b37
|
|
@ -1299,8 +1299,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
s_logger.debug("Releasing ip id=" + addrId + "; sourceNat = " + ip.isSourceNat());
|
||||
}
|
||||
|
||||
Network network = null;
|
||||
if (ip.getAssociatedWithNetworkId() != null) {
|
||||
Network network = _networksDao.findById(ip.getAssociatedWithNetworkId());
|
||||
network = _networksDao.findById(ip.getAssociatedWithNetworkId());
|
||||
}
|
||||
if (network != null) {
|
||||
try {
|
||||
if (!applyIpAssociations(network, true)) {
|
||||
s_logger.warn("Unable to apply ip address associations for " + network);
|
||||
|
|
|
|||
Loading…
Reference in New Issue