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:
a968b5e
)
net: rose: add missing dev_put() on error in rose_bind
author
YueHaibing
<yuehaibing@huawei.com>
Tue, 19 Feb 2019 08:06:22 +0000
(16:06 +0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 19 Feb 2019 21:22:46 +0000
(13:22 -0800)
when capable check failed, dev_put should
be call before return -EACCES.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rose/af_rose.c
patch
|
blob
|
history
diff --git
a/net/rose/af_rose.c
b/net/rose/af_rose.c
index d00a0ef39a56b38cae4114654c44a3bddccb35ba..c96f63ffe31e5fe543b4d033d4342a1e405c6d7b 100644
(file)
--- a/
net/rose/af_rose.c
+++ b/
net/rose/af_rose.c
@@
-689,8
+689,10
@@
static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
rose->source_call = user->call;
ax25_uid_put(user);
} else {
- if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE))
+ if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) {
+ dev_put(dev);
return -EACCES;
+ }
rose->source_call = *source;
}