Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41745
b: refs/heads/master
c: eafff86
h: refs/heads/master
i:
  41743: 4e14bbb
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Dec 3, 2006
1 parent e98efdf commit 63e06cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0459d70add3f7ca5d433d4b2334cc6ec9ddab05b
refs/heads/master: eafff86d3bd80403c808f67f5389813fdb5bd6c8
12 changes: 7 additions & 5 deletions trunk/net/netrom/nr_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,15 @@ static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax2
atomic_set(&nr_neigh->refcount, 1);

if (ax25_digi != NULL && ax25_digi->ndigi > 0) {
if ((nr_neigh->digipeat = kmalloc(sizeof(*ax25_digi), GFP_KERNEL)) == NULL) {
nr_neigh->digipeat = kmemdup(ax25_digi,
sizeof(*ax25_digi),
GFP_KERNEL);
if (nr_neigh->digipeat == NULL) {
kfree(nr_neigh);
if (nr_node)
nr_node_put(nr_node);
return -ENOMEM;
}
memcpy(nr_neigh->digipeat, ax25_digi,
sizeof(*ax25_digi));
}

spin_lock_bh(&nr_neigh_list_lock);
Expand Down Expand Up @@ -432,11 +433,12 @@ static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net
atomic_set(&nr_neigh->refcount, 1);

if (ax25_digi != NULL && ax25_digi->ndigi > 0) {
if ((nr_neigh->digipeat = kmalloc(sizeof(*ax25_digi), GFP_KERNEL)) == NULL) {
nr_neigh->digipeat = kmemdup(ax25_digi, sizeof(*ax25_digi),
GFP_KERNEL);
if (nr_neigh->digipeat == NULL) {
kfree(nr_neigh);
return -ENOMEM;
}
memcpy(nr_neigh->digipeat, ax25_digi, sizeof(*ax25_digi));
}

spin_lock_bh(&nr_neigh_list_lock);
Expand Down

0 comments on commit 63e06cc

Please sign in to comment.