Always check whether netif_default is NULL

In general, netif_default may be NULL, and various places in the code
already check for this case before attempting to dereference the
netif_default pointer.  Some places do not perform this check though,
and may cause null pointer dereferences if netif_default is not set.
This patch adds NULL checks to those places as well.
2 files changed