]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Revert the recent addition of memset()'s to TC_COMMIT. One of them is bogus and the...
authorPhil Oester <kernel@linuxace.com>
Fri, 4 Feb 2005 07:38:02 +0000 (07:38 +0000)
committerMartin Josefsson <gandalf@wlug.westbo.se>
Fri, 4 Feb 2005 07:38:02 +0000 (07:38 +0000)
Noticed and reverted by Phil Oester.

libiptc/libiptc.c

index 7bed22115fec163ab16e3869e1f7757dcde75449..d3d0fa7e8fd985d7e395b64670ba601c992f0b01 100644 (file)
@@ -2047,7 +2047,6 @@ TC_COMMIT(TC_HANDLE_T *handle)
 
        counterlen = sizeof(STRUCT_COUNTERS_INFO)
                        + sizeof(STRUCT_COUNTERS) * new_number;
-       memset(repl, 0, sizeof(*repl) + (*handle)->entries->size);
 
        /* These are the old counters we will get from kernel */
        repl->counters = malloc(sizeof(STRUCT_COUNTERS)
@@ -2057,8 +2056,6 @@ TC_COMMIT(TC_HANDLE_T *handle)
                errno = ENOMEM;
                return 0;
        }
-       memset(repl->counters, 0, sizeof(STRUCT_COUNTERS)
-                       * (*handle)->info.num_entries);
        /* These are the counters we're going to put back, later. */
        newcounters = malloc(counterlen);
        if (!newcounters) {