bridge: Fix null pointer dereference.
authorBen Pfaff <blp@nicira.com>
Fri, 1 Jul 2011 17:13:35 +0000 (10:13 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 1 Jul 2011 17:14:04 +0000 (10:14 -0700)
commit316dec68688aeccc1bbb90e555d9c0ca259d9fc7
tree46cac49d03e60162198d512e20b909b17fb91e96
parentfeb83d8aae83a549e660380820df40ee2490b1d9
bridge: Fix null pointer dereference.

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>
vswitchd/bridge.c