]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Properly initialize revision for ip6tables targets
authorPatrick McHardy <kaber@trash.net>
Tue, 15 Apr 2008 13:51:19 +0000 (15:51 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 15 Apr 2008 13:51:19 +0000 (15:51 +0200)
Also resync error handling with iptables.

ip6tables.c

index 8bcce0e060aac76209deee8c08c074e6ad34c98b..bc65012fb4f905332eeeede7e8afbc9b432f8c4f 100644 (file)
@@ -1393,9 +1393,16 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                                target->t = fw_calloc(1, size);
                                target->t->u.target_size = size;
                                strcpy(target->t->u.user.name, jumpto);
+                               set_revision(target->t->u.user.name,
+                                            target->revision);
                                if (target->init != NULL)
                                        target->init(target->t);
-                               opts = merge_options(opts, target->extra_opts, &target->option_offset);
+                               opts = merge_options(opts,
+                                                    target->extra_opts,
+                                                    &target->option_offset);
+                               if (opts == NULL)
+                                       exit_error(OTHER_PROBLEM,
+                                                  "can't alloc memory!");
                        }
                        break;