[PATCH] net: fix potential null pointer dereference