git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
ax25
/
ax25_route.c
diff --git
a/net/ax25/ax25_route.c
b/net/ax25/ax25_route.c
index
51b7bda
..
0a03816
100644
(file)
--- a/
net/ax25/ax25_route.c
+++ b/
net/ax25/ax25_route.c
@@
-71,7
+71,7
@@
void ax25_rt_device_down(struct net_device *dev)
write_unlock(&ax25_route_lock);
}
write_unlock(&ax25_route_lock);
}
-static int ax25_rt_add(struct ax25_routes_struct *route)
+static int
__must_check
ax25_rt_add(struct ax25_routes_struct *route)
{
ax25_route *ax25_rt;
ax25_dev *ax25_dev;
{
ax25_route *ax25_rt;
ax25_dev *ax25_dev;
@@
-432,11
+432,12
@@
int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
}
if (ax25_rt->digipeat != NULL) {
}
if (ax25_rt->digipeat != NULL) {
- if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
+ ax25->digipeat = kmemdup(ax25_rt->digipeat, sizeof(ax25_digi),
+ GFP_ATOMIC);
+ if (ax25->digipeat == NULL) {
err = -ENOMEM;
goto put;
}
err = -ENOMEM;
goto put;
}
- memcpy(ax25->digipeat, ax25_rt->digipeat, sizeof(ax25_digi));
ax25_adjust_path(addr, ax25->digipeat);
}
ax25_adjust_path(addr, ax25->digipeat);
}