aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ax25/ax25_route.c')
-rw-r--r--net/ax25/ax25_route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index 51b7bdaf27eb..8580356ace5c 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -432,11 +432,12 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
432 } 432 }
433 433
434 if (ax25_rt->digipeat != NULL) { 434 if (ax25_rt->digipeat != NULL) {
435 if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { 435 ax25->digipeat = kmemdup(ax25_rt->digipeat, sizeof(ax25_digi),
436 GFP_ATOMIC);
437 if (ax25->digipeat == NULL) {
436 err = -ENOMEM; 438 err = -ENOMEM;
437 goto put; 439 goto put;
438 } 440 }
439 memcpy(ax25->digipeat, ax25_rt->digipeat, sizeof(ax25_digi));
440 ax25_adjust_path(addr, ax25->digipeat); 441 ax25_adjust_path(addr, ax25->digipeat);
441 } 442 }
442 443