|
@@ -819,6 +819,10 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
|
|
offsetof(struct rt6_info, rt6i_src),
|
|
offsetof(struct rt6_info, rt6i_src),
|
|
allow_create, replace_required);
|
|
allow_create, replace_required);
|
|
|
|
|
|
|
|
+ if (IS_ERR(sn)) {
|
|
|
|
+ err = PTR_ERR(sn);
|
|
|
|
+ sn = NULL;
|
|
|
|
+ }
|
|
if (!sn) {
|
|
if (!sn) {
|
|
/* If it is failed, discard just allocated
|
|
/* If it is failed, discard just allocated
|
|
root, and then (in st_failure) stale node
|
|
root, and then (in st_failure) stale node
|