Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58bc57471514be9206ebcda90b1076f6be41d1c7
Commit:     58bc57471514be9206ebcda90b1076f6be41d1c7
Parent:     81dcd1690697efbdf8126e78fbbf7c76d359377f
Author:     Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 14 15:50:58 2006 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sun Dec 17 21:59:10 2006 -0800

    [AX.25]: Fix unchecked nr_add_node uses.
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netrom/nr_route.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index c6aa7aa..8f88964 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -779,9 +779,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
        nr_src  = (ax25_address *)(skb->data + 0);
        nr_dest = (ax25_address *)(skb->data + 7);
 
-       if (ax25 != NULL)
-               nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat,
-                           ax25->ax25_dev->dev, 0, 
sysctl_netrom_obsolescence_count_initialiser);
+       if (ax25 != NULL) {
+               ret = nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat,
+                                 ax25->ax25_dev->dev, 0,
+                                 sysctl_netrom_obsolescence_count_initialiser);
+               if (ret)
+                       return ret;
+       }
 
        if ((dev = nr_dev_get(nr_dest)) != NULL) {      /* Its for me */
                if (ax25 == NULL)                       /* Its from me */
@@ -846,6 +850,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
        ret = (nr_neigh->ax25 != NULL);
        nr_node_unlock(nr_node);
        nr_node_put(nr_node);
+
        return ret;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to