Skip to content

Commit

Permalink
CID-1116300 Prevent potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
spark404 committed Sep 19, 2014
1 parent 6f54d48 commit 90df7cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/com/cloud/resource/ServerResourceBase.java
Expand Up @@ -122,6 +122,10 @@ public boolean configure(final String name, Map<String, Object> params) throws C
}
}
String infos[] = NetUtils.getNetworkParams(_privateNic);
if (infos == null) {
s_logger.warn("Incorrect details for private Nic during initialization of ServerResourceBase");
return false;
}
params.put("host.ip", infos[0]);
params.put("host.mac.address", infos[1]);

Expand Down

0 comments on commit 90df7cf

Please sign in to comment.