device: Fix null pointer derefence if device is unset
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 1 Feb 2016 09:56:30 +0000 (10:56 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 1 Feb 2016 10:09:58 +0000 (11:09 +0100)
commit3610a24b218974bdf2d2f709a8af9e4a990c47bd
tree8e7b0eacc70ed22586592e556482cd71f507cf09
parentabbea9ebe8a8b56032e0f85b8572f0671dc094e5
device: Fix null pointer derefence if device is unset

Fix null pointer deference in device_claim if device is unset in device_user
struct. Typically this is observed when the parent device is removed
from (mac)vlan device config followed by a network reload

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
device.c