projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11387fe
)
net: fix potential null pointer dereference
author
Gustavo A. R. Silva
<
[email protected]
>
Tue, 23 May 2017 23:18:37 +0000
(18:18 -0500)
committer
David S. Miller
<
[email protected]
>
Thu, 25 May 2017 16:54:02 +0000
(12:54 -0400)
Add null check to avoid a potential null pointer dereference.
Addresses-Coverity-ID:
1408831
Signed-off-by: Gustavo A. R. Silva <
[email protected]
>
Acked-by: Pablo Neira Ayuso <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/gtp.c
patch
|
blob
|
history
diff --git
a/drivers/net/gtp.c
b/drivers/net/gtp.c
index 4fea1b3dfbb4457247c4bc98dc9378591c36ecd3..7b652bb7ebe407b35c054009b521b173fd9fa361 100644
(file)
--- a/
drivers/net/gtp.c
+++ b/
drivers/net/gtp.c
@@
-873,7
+873,7
@@
static struct gtp_dev *gtp_find_dev(struct net *src_net, struct nlattr *nla[])
/* Check if there's an existing gtpX device to configure */
dev = dev_get_by_index_rcu(net, nla_get_u32(nla[GTPA_LINK]));
- if (dev->netdev_ops == >p_netdev_ops)
+ if (dev
&& dev
->netdev_ops == >p_netdev_ops)
gtp = netdev_priv(dev);
put_net(net);