diff options
-rw-r--r-- | net/netfilter/x_tables.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 3ae32340d4df..445de702b8b7 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -801,6 +801,12 @@ xt_replace_table(struct xt_table *table, | |||
801 | struct xt_table_info *private; | 801 | struct xt_table_info *private; |
802 | int ret; | 802 | int ret; |
803 | 803 | ||
804 | ret = xt_jumpstack_alloc(newinfo); | ||
805 | if (ret < 0) { | ||
806 | *error = ret; | ||
807 | return NULL; | ||
808 | } | ||
809 | |||
804 | /* Do the substitution. */ | 810 | /* Do the substitution. */ |
805 | local_bh_disable(); | 811 | local_bh_disable(); |
806 | private = table->private; | 812 | private = table->private; |
@@ -814,12 +820,6 @@ xt_replace_table(struct xt_table *table, | |||
814 | return NULL; | 820 | return NULL; |
815 | } | 821 | } |
816 | 822 | ||
817 | ret = xt_jumpstack_alloc(newinfo); | ||
818 | if (ret < 0) { | ||
819 | *error = ret; | ||
820 | return NULL; | ||
821 | } | ||
822 | |||
823 | table->private = newinfo; | 823 | table->private = newinfo; |
824 | newinfo->initial_entries = private->initial_entries; | 824 | newinfo->initial_entries = private->initial_entries; |
825 | 825 | ||