If the netdev_open() fails then iface->netdev will be NULL and
iface_refresh_stats() will cause a null pointer dereference in
netdev_get_stats().
Fixes a problem introduced by commit
1101a0b47 "bridge: Populate interface
status/statistics as soon as a port is added."
Reported-by: Aaron Rosen <arosen@clemson.edu>
}
/* Populate stats columns in new Interface rows. */
- if (!iface->cfg->mtu) {
+ if (iface->netdev && !iface->cfg->mtu) {
iface_refresh_stats(iface);
iface_refresh_status(iface);
}