projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b15473
)
interface: fix NULL pointer defref in interface_set_main_dev
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 18 Jun 2013 16:24:37 +0000
(18:24 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 18 Jun 2013 16:24:51 +0000
(18:24 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index 81de337e05d5347724ace34b531a98e59839815d..ddbdca9122a9ce1e1b00b3a70d442cb53d4260b8 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-675,6
+675,9
@@
interface_set_main_dev(struct interface *iface, struct device *dev)
interface_set_l3_dev(iface, dev);
device_add_user(&iface->main_dev, dev);
+ if (!dev)
+ return;
+
if (claimed)
device_claim(&iface->l3_dev);