Skip to content

Commit 90df7cf

Browse files
committed
CID-1116300 Prevent potential NPE
1 parent 6f54d48 commit 90df7cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/src/com/cloud/resource/ServerResourceBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ public boolean configure(final String name, Map<String, Object> params) throws C
122122
}
123123
}
124124
String infos[] = NetUtils.getNetworkParams(_privateNic);
125+
if (infos == null) {
126+
s_logger.warn("Incorrect details for private Nic during initialization of ServerResourceBase");
127+
return false;
128+
}
125129
params.put("host.ip", infos[0]);
126130
params.put("host.mac.address", infos[1]);
127131

0 commit comments

Comments
 (0)