|
@@ -696,10 +696,7 @@ static int nf_tables_newtable(struct net *net, struct sock *nlsk,
|
|
if (IS_ERR(table)) {
|
|
if (IS_ERR(table)) {
|
|
if (PTR_ERR(table) != -ENOENT)
|
|
if (PTR_ERR(table) != -ENOENT)
|
|
return PTR_ERR(table);
|
|
return PTR_ERR(table);
|
|
- table = NULL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (table != NULL) {
|
|
|
|
|
|
+ } else {
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
return -EEXIST;
|
|
return -EEXIST;
|
|
if (nlh->nlmsg_flags & NLM_F_REPLACE)
|
|
if (nlh->nlmsg_flags & NLM_F_REPLACE)
|
|
@@ -2963,10 +2960,7 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,
|
|
if (IS_ERR(set)) {
|
|
if (IS_ERR(set)) {
|
|
if (PTR_ERR(set) != -ENOENT)
|
|
if (PTR_ERR(set) != -ENOENT)
|
|
return PTR_ERR(set);
|
|
return PTR_ERR(set);
|
|
- set = NULL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (set != NULL) {
|
|
|
|
|
|
+ } else {
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
return -EEXIST;
|
|
return -EEXIST;
|
|
if (nlh->nlmsg_flags & NLM_F_REPLACE)
|
|
if (nlh->nlmsg_flags & NLM_F_REPLACE)
|
|
@@ -4153,10 +4147,7 @@ static int nf_tables_newobj(struct net *net, struct sock *nlsk,
|
|
if (err != -ENOENT)
|
|
if (err != -ENOENT)
|
|
return err;
|
|
return err;
|
|
|
|
|
|
- obj = NULL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (obj != NULL) {
|
|
|
|
|
|
+ } else {
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
if (nlh->nlmsg_flags & NLM_F_EXCL)
|
|
return -EEXIST;
|
|
return -EEXIST;
|
|
|
|
|