mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-14 16:12:10 +00:00
Prevents possible crash on dynamic interfaces
This commit is contained in:
parent
dbf2d0b286
commit
79cb1eefd4
2 changed files with 4 additions and 4 deletions
|
|
@ -1032,11 +1032,11 @@ NetworkInterface* NetworkInterface::getSubInterface(u_int32_t criteria, bool par
|
|||
h->iface = new NetworkInterface(buf, vIface_type);
|
||||
|
||||
if(h->iface) {
|
||||
h->iface->allocateNetworkStats();
|
||||
HASH_ADD_INT(flowHashing, criteria, h);
|
||||
ntop->registerInterface(h->iface);
|
||||
numVirtualInterfaces++;
|
||||
h->iface->allocateNetworkStats();
|
||||
h->iface->setDynamicInterface();
|
||||
HASH_ADD_INT(flowHashing, criteria, h);
|
||||
numVirtualInterfaces++;
|
||||
}
|
||||
} else
|
||||
ntop->getTrace()->traceEvent(TRACE_WARNING, "Not enough memory");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue