projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30fbc9f
)
[IPV4]: Fix rtm_to_ifaddr() error handling.
author
Evgeniy Polyakov
<johnpol@2ka.mipt.ru>
Fri, 9 Mar 2007 21:43:24 +0000
(13:43 -0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 9 Mar 2007 21:43:24 +0000
(13:43 -0800)
Return negative error value (embedded in the pointer) instead of
returning NULL.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/devinet.c
b/net/ipv4/devinet.c
index e10794dc5f649e73660441d14bc52b2f4401f5c4..98a00d0edc760c658d23675eec194e8cefc79ae0 100644
(file)
--- a/
net/ipv4/devinet.c
+++ b/
net/ipv4/devinet.c
@@
-502,8
+502,10
@@
static struct in_ifaddr *rtm_to_ifaddr(struct nlmsghdr *nlh)
goto errout;
ifm = nlmsg_data(nlh);
- if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL)
+ if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) {
+ err = -EINVAL;
goto errout;
+ }
dev = __dev_get_by_index(ifm->ifa_index);
if (dev == NULL) {