[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11661361353724-git-send-email-ralf@linux-mips.org>
Date: Thu, 14 Dec 2006 23:42:10 +0100
From: Ralf Baechle <ralf@...ux-mips.org>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-hams@...r.kernel.org,
Ralf Baechle <ralf@...ux-mips.org>
Subject: [AX.25 4/7] Fix unchecked nr_add_node uses
Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>
net/netrom/nr_route.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: linux-net/net/netrom/nr_route.c
===================================================================
--- linux-net.orig/net/netrom/nr_route.c
+++ linux-net/net/netrom/nr_route.c
@@ -779,9 +779,13 @@ int nr_route_frame(struct sk_buff *skb,
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,
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists