Skip to content

Commit

Permalink
[IPV4]: Fix error handling for fib_insert_node call
Browse files Browse the repository at this point in the history
The error handling around fib_insert_node was broken because we always
zeroed the error before checking it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jul 12, 2006
1 parent 4b260a9 commit b47b2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,8 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
*/

if (!fa_head) {
fa_head = fib_insert_node(t, &err, key, plen);
err = 0;
fa_head = fib_insert_node(t, &err, key, plen);
if (err)
goto out_free_new_fa;
}
Expand Down

0 comments on commit b47b2ec

Please sign in to comment.